diff --git a/.vscode/settings.json b/.vscode/settings.json
index db5ab4a..362a04a 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -18,7 +18,8 @@
"Redlock",
"refinedev",
"Sider",
- "tasktr"
+ "tasktr",
+ "unlogged"
],
"conventionalCommits.scopes": [
"be/auth",
diff --git a/apps/fe/src/components/pages/home/header.tsx b/apps/fe/src/components/pages/home/header.tsx
index 4299cb2..b2e69d3 100644
--- a/apps/fe/src/components/pages/home/header.tsx
+++ b/apps/fe/src/components/pages/home/header.tsx
@@ -11,8 +11,9 @@ import {
LoginOutlined,
DownOutlined,
UpOutlined,
- UnorderedListOutlined,
ArrowRightOutlined,
+ ScheduleOutlined,
+ DashboardOutlined,
} from '@ant-design/icons';
import { useIsAuthenticated, useGetIdentity, useLogout } from '@refinedev/core';
import { LoginResponseDto } from '~be/app/auth/dtos';
@@ -53,6 +54,36 @@ export default function HomePageHeader() {
setDropdownOpen(flag);
};
+ const loggedItems = [
+ {
+ key: 'dashboard',
+ icon: ,
+ title: 'Dashboard',
+ href: '/dashboard',
+ },
+ {
+ key: 'tasks',
+ icon: ,
+ title: 'Tasks',
+ href: '/tasks',
+ },
+ {
+ key: 'logout',
+ icon: ,
+ title: 'Logout',
+ onClick: handleLogout,
+ },
+ ];
+ const unloggedItems = [
+ {
+ key: 'login',
+ icon: ,
+ title: 'Login',
+ href: '/login',
+ onClick: undefined,
+ },
+ ];
+
return (
{
+ return {
+ key: item.key,
label: (
-
+
-
- Tasks
+ {item.icon}
+ {item.title}
-
+
),
- },
- {
- key: 'logout',
- label: (
-
-
- Logout
-
-
- ),
- },
- ],
+ };
+ }),
}}
trigger={['click']}
- onVisibleChange={handleVisibleChange}
+ onOpenChange={handleVisibleChange}
>
-
-
-
+ {unloggedItems.map((item) => (
+
+
+
+ ))}