Skip to content

Commit

Permalink
refactor: replace /system/ route with /
Browse files Browse the repository at this point in the history
  • Loading branch information
alsakhaev committed Jan 23, 2025
1 parent d4b8b0a commit 97fde94
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
16 changes: 8 additions & 8 deletions libs/shared-components/src/mini-overlay/components/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -215,31 +215,31 @@ const Header: FC = () => {
</ProfileNetwork>
</ProfileInfo>
<ProfileButton
isActive={location.pathname === '/system/main'}
isActive={location.pathname === '/main'}
disabled={waiting}
onClick={() => navigate(`/system/main`)}
onClick={() => navigate(`/main`)}
>
<HomeIcon />
</ProfileButton>
<ProfileButton
isActive={location.pathname === '/system/profile'}
isActive={location.pathname === '/profile'}
data-testid="profile-page-button"
disabled={waiting}
onClick={() => navigate(`/system/profile`)}
onClick={() => navigate(`/profile`)}
>
<PersonIcon />
</ProfileButton>
<ProfileButton
isActive={location.pathname === '/system/applications'}
isActive={location.pathname === '/applications'}
disabled={waiting}
onClick={() => navigate(`/system/applications`)}
onClick={() => navigate(`/applications`)}
>
<PlayCenterIcon />
</ProfileButton>
<ProfileButton
isActive={location.pathname === '/system/notifications'}
isActive={location.pathname === '/notifications'}
disabled={waiting}
onClick={() => navigate(`/system/notifications`)}
onClick={() => navigate(`/notifications`)}
>
<BellIcon />
</ProfileButton>
Expand Down
2 changes: 1 addition & 1 deletion libs/shared-components/src/mini-overlay/pages/profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const Profile: FC<{
return (
<ProfileContainer data-testid="profile-page">
<Header>
<BackButton onClick={() => navigate('/system/main')}>
<BackButton onClick={() => navigate('/main')}>
<ArrowIcon />
</BackButton>
<H1>Profile</H1>
Expand Down
12 changes: 6 additions & 6 deletions libs/shared-components/src/mini-overlay/side-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ export const SidePanel: FC<ISidePanelProps> = ({}) => {
{/* ToDo: move to pages? */}
<Header />
<Routes>
<Route path="/" element={<Navigate to="/system/main" replace />} />
<Route path="/system/main" element={<MainPage />} />
<Route path="/system/profile" element={<ProfilePage />} />
<Route path="/" element={<Navigate to="/main" replace />} />
<Route path="/main" element={<MainPage />} />
<Route path="/profile" element={<ProfilePage />} />
<Route
path="/system/notifications"
path="/notifications"
element={<NotificationsPage modalContainerRef={modalContainerRef} />}
/>
<Route
path="/system/edit-mutation/:authorId/mutation/:localId"
path="/edit-mutation/:authorId/mutation/:localId"
element={<EditMutationPage />}
/>
<Route path="/system/applications" element={<ApplicationsPage />} />
<Route path="/applications" element={<ApplicationsPage />} />
</Routes>
</div>
</MemoryRouter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export const Dropdown: FC<DropdownProps> = ({}: DropdownProps) => {
}

const handleMutateButtonClick = () => {
navigate(`/system/edit-mutation/${selectedMutationId}`)
navigate(`/edit-mutation/${selectedMutationId}`)
}

const handleFavoriteButtonClick = (mutationId: string) => {
Expand Down

0 comments on commit 97fde94

Please sign in to comment.