diff --git a/clientv2/src/components/Navbar/index.tsx b/clientv2/src/components/Navbar/index.tsx index 9f27954..b97e611 100644 --- a/clientv2/src/components/Navbar/index.tsx +++ b/clientv2/src/components/Navbar/index.tsx @@ -1,10 +1,10 @@ 'use client'; -import { Group, Divider, Box, Burger, Drawer, ScrollArea, rem } from '@mantine/core'; +import { Group, Divider, Box, Burger, Drawer, ScrollArea, rem, Badge } from '@mantine/core'; import { useDisclosure } from '@mantine/hooks'; import classes from './index.module.css'; import LogoBadge from './Logo'; -import { AuthContextData } from '../AuthContext'; +import { AuthContextData, AuthSourceEnum } from '../AuthContext'; import { AuthenticatedProfileDropdown } from '../ProfileDropdown'; interface HeaderNavbarProps { @@ -13,13 +13,27 @@ interface HeaderNavbarProps { const HeaderNavbar: React.FC = ({ userData }) => { const [drawerOpened, { toggle: toggleDrawer, close: closeDrawer }] = useDisclosure(false); + let badge = null; + if (userData?.authenticationMethod === AuthSourceEnum.LOCAL) { + badge = ( + + Recruiter + + ); + } else if (userData?.authenticationMethod === AuthSourceEnum.MSAL) { + badge = ( + + Student + + ); + } return (
- + {badge} Home diff --git a/clientv2/src/pages/recruiter/RecruiterHome.page.tsx b/clientv2/src/pages/recruiter/RecruiterHome.page.tsx index 8ec3669..4c9df85 100644 --- a/clientv2/src/pages/recruiter/RecruiterHome.page.tsx +++ b/clientv2/src/pages/recruiter/RecruiterHome.page.tsx @@ -1,4 +1,4 @@ -import { Badge, Title } from '@mantine/core'; +import { Title } from '@mantine/core'; import { useAuth } from '@/components/AuthContext'; import { HeaderNavbar } from '@/components/Navbar'; @@ -12,9 +12,6 @@ export function RecruiterHomePage() { Hello {firstName} {lastName}! - - Recruiter - ); diff --git a/clientv2/src/pages/student/StudentHome.page.tsx b/clientv2/src/pages/student/StudentHome.page.tsx index 20dc109..908b92d 100644 --- a/clientv2/src/pages/student/StudentHome.page.tsx +++ b/clientv2/src/pages/student/StudentHome.page.tsx @@ -1,4 +1,4 @@ -import { Badge, Title } from '@mantine/core'; +import { Title } from '@mantine/core'; import { useAuth } from '@/components/AuthContext'; import { HeaderNavbar } from '@/components/Navbar'; @@ -12,9 +12,6 @@ export function StudentHomePage() { Hello {firstName} {lastName}! - - Student - );