fix: path
This commit is contained in:
@@ -91,8 +91,8 @@ const HorizontalMenu = ({ dictionary }: { dictionary: Awaited<ReturnType<typeof
|
||||
}}
|
||||
>
|
||||
<SubMenu label={dictionary['navigation'].dashboards} icon={<i className='tabler-smart-home' />}>
|
||||
<MenuItem href={`/${locale}/dashboards/crm`} icon={<i className='tabler-chart-pie-2' />}>
|
||||
{dictionary['navigation'].crm}
|
||||
<MenuItem href={`/${locale}/dashboards/overview`} icon={<i className='tabler-chart-pie-2' />}>
|
||||
{dictionary['navigation'].overview}
|
||||
</MenuItem>
|
||||
<MenuItem href={`/${locale}/dashboards/analytics`} icon={<i className='tabler-trending-up' />}>
|
||||
{dictionary['navigation'].analytics}
|
||||
|
||||
@@ -30,6 +30,7 @@ import { useSettings } from '@core/hooks/useSettings'
|
||||
// Util Imports
|
||||
import { getLocalizedUrl } from '@/utils/i18n'
|
||||
import { useAuthMutation } from '../../../services/mutations/auth'
|
||||
import { useAuth } from '../../../contexts/authContext'
|
||||
|
||||
// Styled component for badge content
|
||||
const BadgeContentSpan = styled('span')({
|
||||
@@ -42,6 +43,8 @@ const BadgeContentSpan = styled('span')({
|
||||
})
|
||||
|
||||
const UserDropdown = () => {
|
||||
const { currentUser } = useAuth()
|
||||
|
||||
// States
|
||||
const [open, setOpen] = useState(false)
|
||||
|
||||
@@ -85,6 +88,10 @@ const UserDropdown = () => {
|
||||
}
|
||||
}
|
||||
|
||||
if (!currentUser) {
|
||||
return null
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<Badge
|
||||
@@ -124,9 +131,9 @@ const UserDropdown = () => {
|
||||
<Avatar alt={'john doe'} src={''} />
|
||||
<div className='flex items-start flex-col'>
|
||||
<Typography className='font-medium' color='text.primary'>
|
||||
{'john doe'}
|
||||
{currentUser?.name}
|
||||
</Typography>
|
||||
<Typography variant='caption'>{'email'}</Typography>
|
||||
<Typography variant='caption'>{currentUser?.email}</Typography>
|
||||
</div>
|
||||
</div>
|
||||
<Divider className='mlb-1' />
|
||||
|
||||
@@ -30,8 +30,8 @@ const defaultSuggestions: DefaultSuggestionsType[] = [
|
||||
icon: 'tabler-trending-up'
|
||||
},
|
||||
{
|
||||
label: 'CRM',
|
||||
href: '/dashboards/crm',
|
||||
label: 'Overview',
|
||||
href: '/dashboards/overview',
|
||||
icon: 'tabler-chart-pie-2'
|
||||
},
|
||||
{
|
||||
|
||||
@@ -29,8 +29,8 @@ const noResultData: NoResultData[] = [
|
||||
icon: 'tabler-user'
|
||||
},
|
||||
{
|
||||
label: 'CRM',
|
||||
href: '/dashboards/crm',
|
||||
label: 'Overview',
|
||||
href: '/dashboards/overview',
|
||||
icon: 'tabler-chart-donut-3'
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user