feat: 添加日志

This commit is contained in:
zdl
2025-10-18 08:08:58 +08:00
parent 36558e0715
commit b46ee4a18e
5 changed files with 74 additions and 45 deletions

View File

@@ -24,6 +24,7 @@ import {
useDisclosure,
} from "@chakra-ui/react";
import { useAuth } from "../../../contexts/AuthContext";
import { logger } from "../../../utils/logger";
export default function Profile() {
const { colorMode } = useColorMode();
@@ -32,7 +33,10 @@ export default function Profile() {
const { isOpen, onOpen, onClose } = useDisclosure();
const handleLogout = () => {
logger.info('Profile', '用户登出', { userId: user?.id });
logout();
// ✅ 保留登出成功toast关键操作提示
toast({
title: "已登出",
description: "您已成功退出登录",