Skip to content

Commit

Permalink
[UPDATE] Fixed Router comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ThunderNaka committed May 27, 2024
1 parent 7e89e9f commit c1dbb45
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/layout/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import { twMerge as tw } from "tailwind-merge";

import { ROUTES } from "~/router";

const navigation = [{ name: "Home", href: ROUTES.home, icon: HomeIcon }];

export interface SidebarProps {
show: boolean;
onClose: () => void;
Expand All @@ -16,6 +14,7 @@ export interface SidebarProps {
export const Sidebar = ({ show, onClose }: SidebarProps) => {
const location = useLocation();
const current = location.pathname;
const navigation = [{ name: "Home", href: ROUTES.home, icon: HomeIcon }];

return (
<>
Expand Down
3 changes: 1 addition & 2 deletions src/router/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,10 @@ export const Router = () => {
{/* PRIVATE ONLY ROUTES */}
{userState === "loggedIn" && (
<>
<Route element={<Navigate to={ROUTES.home} />} path={"*"} />
<Route path="*" element={<NotFound />} />
<Route element={<Layout />}>
<Route element={<Home />} path={ROUTES.home} />
</Route>
<Route path="*" element={<NotFound />} />
</>
)}
</Routes>
Expand Down

0 comments on commit c1dbb45

Please sign in to comment.