-
-
Notifications
You must be signed in to change notification settings - Fork 774
Expand file tree
/
Copy pathApp.tsx
More file actions
23 lines (20 loc) · 774 Bytes
/
App.tsx
File metadata and controls
23 lines (20 loc) · 774 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { HashRouter as Router, Routes, Route } from 'react-router';
import { SecurityContext } from './types/Security';
import { ModuleContext } from './types/Module';
import ContactList from './pages/ContactList';
import ContactForm from './pages/ContactForm';
interface AppProps {
security: SecurityContext;
moduleContext: ModuleContext;
}
export default function App({ security, moduleContext }: AppProps) {
return (
<Router>
<Routes>
<Route path="/" element={<ContactList security={security} moduleContext={moduleContext} />} />
<Route path="/add" element={<ContactForm moduleContext={moduleContext} />} />
<Route path="/edit/:id" element={<ContactForm moduleContext={moduleContext} />} />
</Routes>
</Router>
);
}