mirror of
https://gitlab.massbug.com/massbug/judge4c.git
synced 2025-07-04 09:41:34 +00:00
feat(sidebar): remove user data from AppSidebar and update NavUser component usage; refactor ThemeSwitcher to export function
This commit is contained in:
parent
c39dd21278
commit
22e4580bc9
@ -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<typeof Sidebar>) {
|
||||
<NavProjects projects={data.projects} />
|
||||
</SidebarContent>
|
||||
<SidebarFooter>
|
||||
<NavUser user={data.user} />
|
||||
<NavUser />
|
||||
</SidebarFooter>
|
||||
<SidebarRail />
|
||||
</Sidebar>
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user