blob: 3f95af20a87b0355330726e88fe14930b1e3a172 [file] [log] [blame]
Larbi Gharibe9af9732021-03-31 15:08:01 +01001/*
simon26e79f72022-10-05 22:16:08 -04002 * Copyright (C) 2022 Savoir-faire Linux Inc.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Affero General Public License as
6 * published by the Free Software Foundation; either version 3 of the
7 * License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Affero General Public License for more details.
13 *
14 * You should have received a copy of the GNU Affero General Public
15 * License along with this program. If not, see
16 * <https://www.gnu.org/licenses/>.
17 */
Michelle Sepkap Sime51c00452022-10-31 21:26:38 -040018import { useState } from 'react';
19import { Outlet } from 'react-router-dom';
idillon-sfl0e1a0d92022-10-25 16:52:44 -040020
simond47ef9e2022-09-28 22:24:28 -040021import WelcomeAnimation from './components/welcome';
Adrien Béraudab519ff2022-05-03 15:34:48 -040022
simon80b7b3b2022-09-28 17:50:10 -040023const App = () => {
Michelle Sepkap Sime51c00452022-10-31 21:26:38 -040024 const [displayWelcome, setDisplayWelcome] = useState<boolean>(true);
Adrien Béraud6c934962021-06-07 10:13:26 -040025
simond47ef9e2022-09-28 22:24:28 -040026 console.log('App render');
idillond858c182022-09-16 13:18:26 -040027
28 if (displayWelcome) {
Michelle Sepkap Sime51c00452022-10-31 21:26:38 -040029 return <WelcomeAnimation onComplete={() => setDisplayWelcome(false)} />;
idillond858c182022-09-16 13:18:26 -040030 }
31
Michelle Sepkap Sime51c00452022-10-31 21:26:38 -040032 return <Outlet />;
idillond858c182022-09-16 13:18:26 -040033};
Larbi Gharibe9af9732021-03-31 15:08:01 +010034
simond47ef9e2022-09-28 22:24:28 -040035export default App;