ShiftSync/src/router/AppRouter.jsx

34 lines
841 B
React
Raw Normal View History

import React, { useEffect } from 'react';
2025-05-20 16:28:48 +00:00
import { Routes, Route } from 'react-router-dom';
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 = () => {
const { setUser } = useLocalStore();
useEffect(() => {
setUser({
2025-05-26 01:40:36 +00:00
firstName: 'ShiftSync',
lastName: 'Test-User',
email: 'testuser@shift-sync.com',
scheduler: false,
manager: true,
isAdmin: false
})
}, []);
2025-05-26 01:40:36 +00:00
2025-05-20 16:28:48 +00:00
return (
<Shell>
<Routes>
<Route path="/" element={<Home />} />
<Route path="/schedule" element={<Schedule />} />
<Route path="/settings" element={<Settings />} />
<Route path="/profile" element={<Profile />} />
</Routes>
</Shell>
2025-05-20 16:28:48 +00:00
);
};
export default AppRouter