significant refactor
This commit is contained in:
@@ -3,7 +3,6 @@ import { useMemo } from "react";
|
||||
|
||||
export const useLinks = (userId: string | undefined, roles: string[]) =>
|
||||
useMemo(() => {
|
||||
if (!userId) throw new Error("userId is undefined")
|
||||
const links = [
|
||||
{
|
||||
label: 'Home',
|
||||
@@ -23,7 +22,8 @@ export const useLinks = (userId: string | undefined, roles: string[]) =>
|
||||
{
|
||||
label: 'Profile',
|
||||
href: `/profile/${userId}`,
|
||||
Icon: UserCircleIcon
|
||||
Icon: UserCircleIcon,
|
||||
include: ['/settings']
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user