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.
|
// This is sample data.
|
||||||
const data = {
|
const data = {
|
||||||
user: {
|
|
||||||
name: "shadcn",
|
|
||||||
email: "m@example.com",
|
|
||||||
avatar: "/avatars/shadcn.jpg",
|
|
||||||
},
|
|
||||||
teams: [
|
teams: [
|
||||||
{
|
{
|
||||||
name: "Acme Inc",
|
name: "Acme Inc",
|
||||||
@ -167,7 +162,7 @@ export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
|
|||||||
<NavProjects projects={data.projects} />
|
<NavProjects projects={data.projects} />
|
||||||
</SidebarContent>
|
</SidebarContent>
|
||||||
<SidebarFooter>
|
<SidebarFooter>
|
||||||
<NavUser user={data.user} />
|
<NavUser />
|
||||||
</SidebarFooter>
|
</SidebarFooter>
|
||||||
<SidebarRail />
|
<SidebarRail />
|
||||||
</Sidebar>
|
</Sidebar>
|
||||||
|
@ -13,7 +13,7 @@ const items = [
|
|||||||
{ value: "system", label: "System", image: "/ui-system.png" },
|
{ value: "system", label: "System", image: "/ui-system.png" },
|
||||||
];
|
];
|
||||||
|
|
||||||
export default function ThemeSwitcher() {
|
export function ThemeSwitcher() {
|
||||||
const { theme, setTheme } = useTheme();
|
const { theme, setTheme } = useTheme();
|
||||||
const [mounted, setMounted] = useState(false);
|
const [mounted, setMounted] = useState(false);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user