refactor: remove data-table component and related functionality

refactor: update sidebar item interface to use IconType

refactor: modify nav-main and nav-ucenter components to use IconType

refactor: delete unused nav-secondary component

refactor: clean up user profile page logic and improve avatar handling

refactor: remove section-cards component

refactor: add icon type definition for better type safety
This commit is contained in:
2025-09-20 14:36:29 +08:00
parent 709aa82337
commit 640b3299ac
17 changed files with 308 additions and 1327 deletions

View File

@ -9,11 +9,10 @@ import {
SidebarMenuItem,
} from "@/components/ui/sidebar"
import Link from "next/link"
import type { LucideProps } from "lucide-react";
import { ComponentType, SVGProps } from "react"
import { usePathname } from "next/navigation";
import { User } from "@/models/user";
import { useAuth } from "@/contexts/auth-context";
import { IconType } from "@/types/icon";
export function NavMain({
items,
@ -21,7 +20,7 @@ export function NavMain({
items: {
title: string
url: string
icon?: ComponentType<SVGProps<SVGSVGElement> & LucideProps>;
icon?: IconType;
permission: ({ user }: { user: User }) => boolean
}[]
}) {