mirror of
https://litchi.icu/ngc2207/judge4c-latest.git
synced 2025-07-13 11:34:35 +00:00
refactor: optimize imports and add link component to app-sidebar
This commit is contained in:
parent
5b62062cba
commit
52277dec0d
@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import * as React from "react";
|
|
||||||
import {
|
import {
|
||||||
BicepsFlexed,
|
BicepsFlexed,
|
||||||
BookOpen,
|
BookOpen,
|
||||||
@ -12,10 +11,12 @@ import {
|
|||||||
Settings2,
|
Settings2,
|
||||||
SquarePen,
|
SquarePen,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
|
import Link from "next/link";
|
||||||
|
import * as React from "react";
|
||||||
import { NavMain } from "@/components/nav-main";
|
import { NavMain } from "@/components/nav-main";
|
||||||
|
import { NavUser } from "@/components/nav-user";
|
||||||
import { NavProjects } from "@/components/nav-projects";
|
import { NavProjects } from "@/components/nav-projects";
|
||||||
import { NavSecondary } from "@/components/nav-secondary";
|
import { NavSecondary } from "@/components/nav-secondary";
|
||||||
import { NavUser } from "@/components/nav-user";
|
|
||||||
import {
|
import {
|
||||||
Sidebar,
|
Sidebar,
|
||||||
SidebarContent,
|
SidebarContent,
|
||||||
@ -118,7 +119,7 @@ export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
|
|||||||
<SidebarMenu>
|
<SidebarMenu>
|
||||||
<SidebarMenuItem>
|
<SidebarMenuItem>
|
||||||
<SidebarMenuButton size="lg" asChild>
|
<SidebarMenuButton size="lg" asChild>
|
||||||
<a href="/dashboard">
|
<Link href="/">
|
||||||
<div className="flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground">
|
<div className="flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground">
|
||||||
<GraduationCap className="size-6" />
|
<GraduationCap className="size-6" />
|
||||||
</div>
|
</div>
|
||||||
@ -126,7 +127,7 @@ export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
|
|||||||
<span className="truncate font-semibold">上海电力大学</span>
|
<span className="truncate font-semibold">上海电力大学</span>
|
||||||
<span className="truncate text-xs">教育机构</span>
|
<span className="truncate text-xs">教育机构</span>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</Link>
|
||||||
</SidebarMenuButton>
|
</SidebarMenuButton>
|
||||||
</SidebarMenuItem>
|
</SidebarMenuItem>
|
||||||
</SidebarMenu>
|
</SidebarMenu>
|
||||||
|
Loading…
Reference in New Issue
Block a user