2025-05-25 01:58:18 +00:00
|
|
|
import React, { useEffect } from 'react';
|
2025-05-20 16:28:48 +00:00
|
|
|
import { Routes, Route } from 'react-router-dom';
|
2025-05-25 01:58:18 +00:00
|
|
|
import { Home, Profile, Schedule, Settings } from '@src/pages';
|
|
|
|
|
import { Shell } from '@components';
|
|
|
|
|
import { useLocalStore } from '@components';
|
2025-05-20 16:28:48 +00:00
|
|
|
|
|
|
|
|
const AppRouter = () => {
|
2025-05-25 01:58:18 +00:00
|
|
|
const { setUser } = useLocalStore();
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
setUser({
|
|
|
|
|
firstName: 'Matt',
|
|
|
|
|
lastName: 'DiMeglio',
|
|
|
|
|
email: 'mdimeglio@shift-sync.com',
|
|
|
|
|
isAdmin: false
|
|
|
|
|
})
|
|
|
|
|
}, []);
|
2025-05-20 16:28:48 +00:00
|
|
|
return (
|
2025-05-23 22:22:56 +00:00
|
|
|
<Shell>
|
|
|
|
|
<Routes>
|
|
|
|
|
<Route path="/" element={<Home />} />
|
2025-05-25 01:58:18 +00:00
|
|
|
<Route path="/schedule" element={<Schedule />} />
|
|
|
|
|
<Route path="/settings" element={<Settings />} />
|
|
|
|
|
<Route path="/profile" element={<Profile />} />
|
2025-05-23 22:22:56 +00:00
|
|
|
</Routes>
|
|
|
|
|
</Shell>
|
2025-05-20 16:28:48 +00:00
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default AppRouter
|