From 22e4580bc9e49f2f1a2b7fe4bb38451f4760cf05 Mon Sep 17 00:00:00 2001 From: ngc2207 Date: Tue, 4 Feb 2025 14:48:36 +0800 Subject: [PATCH] feat(sidebar): remove user data from AppSidebar and update NavUser component usage; refactor ThemeSwitcher to export function --- src/components/app-sidebar.tsx | 7 +------ src/components/theme-switcher.tsx | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/components/app-sidebar.tsx b/src/components/app-sidebar.tsx index 642d7f1..a5a4fbf 100644 --- a/src/components/app-sidebar.tsx +++ b/src/components/app-sidebar.tsx @@ -28,11 +28,6 @@ import { // This is sample data. const data = { - user: { - name: "shadcn", - email: "m@example.com", - avatar: "/avatars/shadcn.jpg", - }, teams: [ { name: "Acme Inc", @@ -167,7 +162,7 @@ export function AppSidebar({ ...props }: React.ComponentProps) { - + diff --git a/src/components/theme-switcher.tsx b/src/components/theme-switcher.tsx index 1c4cf63..c3d6227 100644 --- a/src/components/theme-switcher.tsx +++ b/src/components/theme-switcher.tsx @@ -13,7 +13,7 @@ const items = [ { value: "system", label: "System", image: "/ui-system.png" }, ]; -export default function ThemeSwitcher() { +export function ThemeSwitcher() { const { theme, setTheme } = useTheme(); const [mounted, setMounted] = useState(false);