refactor(types): moved the item type to the sidebar to keep it more clean
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import { Link } from "@tanstack/react-router";
|
import { Link } from "@tanstack/react-router";
|
||||||
import { type LucideIcon, Server, Settings, User } from "lucide-react";
|
import { Server, Settings, User } from "lucide-react";
|
||||||
import { type UserRoles, userAccess } from "../../lib/authClient";
|
import { userAccess } from "../../lib/authClient";
|
||||||
import {
|
import {
|
||||||
SidebarGroup,
|
SidebarGroup,
|
||||||
SidebarGroupContent,
|
SidebarGroupContent,
|
||||||
@@ -9,15 +9,8 @@ import {
|
|||||||
SidebarMenuButton,
|
SidebarMenuButton,
|
||||||
SidebarMenuItem,
|
SidebarMenuItem,
|
||||||
} from "../ui/sidebar";
|
} from "../ui/sidebar";
|
||||||
|
import type { Items } from "./SideBarNav";
|
||||||
|
|
||||||
type Items = {
|
|
||||||
title: string;
|
|
||||||
url: string;
|
|
||||||
icon: LucideIcon;
|
|
||||||
role: UserRoles["role"][];
|
|
||||||
module: string;
|
|
||||||
active: boolean;
|
|
||||||
};
|
|
||||||
export default function Admin() {
|
export default function Admin() {
|
||||||
const items: Items[] = [
|
const items: Items[] = [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user