This commit is contained in:
2025-06-19 22:03:57 +08:00
parent 8f2df85208
commit 6e73220962
19 changed files with 52 additions and 71 deletions

View File

@@ -3,7 +3,7 @@
import { cn } from "@/lib/utils";
import Link from "next/link";
import { usePathname, useRouter } from "next/navigation";
import { useCallback, useState } from "react";
import { useState } from "react";
import {
Drawer,
DrawerContent,

View File

@@ -46,7 +46,7 @@ export function NavUser({ user, isUserLoading }: { user: User | undefined, isUse
localStorage.removeItem(UserApi.USER_ME_CACHE_KEY)
toast.success('登出成功');
router.replace('/console/login');
} catch (error) {
} catch {
toast.error('登出失败,请稍后再试');
}
}

View File

@@ -1,6 +1,5 @@
'use client';
import { SeparatorProps } from "@radix-ui/react-separator";
import { Button } from "@/components/ui/button"
import {
Dialog,
@@ -9,7 +8,6 @@ import {
DialogFooter,
DialogHeader,
DialogTitle,
DialogTrigger,
} from "@/components/ui/dialog"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"

View File

@@ -10,11 +10,7 @@ import {
} from "@/components/ui/dialog"
import { Button } from "../ui/button";
interface UserProfileProps {
}
export default function ({ onOpenChange, ...props }: UserProfileProps & React.ComponentProps<FC<DialogProps>>) {
export default function UserProfile({ onOpenChange, ...props }: React.ComponentProps<FC<DialogProps>>) {
return (
<Dialog onOpenChange={onOpenChange} {...props}>
<DialogContent className="sm:max-w-[425px]">