chore(profile): 🔧 Update Profile component styling in App.tsx
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
486630a601
commit
18938fb765
1 changed files with 7 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { BrowserRouter, Routes, Route } from 'react-router-dom';
|
||||
import { BrowserRouter, Routes, Route, useNavigate } from 'react-router-dom';
|
||||
import { NavigationBar } from './components/NavigationBar';
|
||||
import { ClientView } from './routes/BrowseView';
|
||||
import { ManageView } from './routes/ManageView';
|
||||
|
|
@ -8,13 +8,18 @@ const VIEWS = [
|
|||
{ id: 'manage', label: 'Manage', path: '/manage' },
|
||||
] as const;
|
||||
|
||||
function ManageRoute() {
|
||||
const navigate = useNavigate();
|
||||
return <ManageView onEditProfile={(slug) => navigate(`/providers/${slug}`)} />;
|
||||
}
|
||||
|
||||
export function App() {
|
||||
return (
|
||||
<BrowserRouter>
|
||||
<NavigationBar views={VIEWS} />
|
||||
<Routes>
|
||||
<Route path="/" element={<ClientView />} />
|
||||
<Route path="/manage" element={<ManageView onEditProfile={(slug) => alert(`Edit profile: ${slug}`)} />} />
|
||||
<Route path="/manage" element={<ManageRoute />} />
|
||||
</Routes>
|
||||
</BrowserRouter>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue