import { Button, Input, Textarea } from "@mui/joy"; import { useTranslation } from "react-i18next"; import { useUserStore } from "@/store/module"; import { showCommonDialog } from "../Dialog/CommonDialog"; import showChangePasswordDialog from "../ChangePasswordDialog"; import Icon from "../Icon"; import showUpdateAccountDialog from "../UpdateAccountDialog"; import UserAvatar from "../UserAvatar"; const MyAccountSection = () => { const { t } = useTranslation(); const userStore = useUserStore(); const user = userStore.state.user as User; const openAPIRoute = `${window.location.origin}/api/memo?openId=${user.openId}`; const handleResetOpenIdBtnClick = async () => { showCommonDialog({ title: t("setting.account-section.openapi-reset"), content: t("setting.account-section.openapi-reset-warning"), style: "warning", dialogName: "reset-openid-dialog", onConfirm: async () => { await userStore.patchUser({ id: user.id, resetOpenId: true, }); }, }); }; return ( <>

{t("setting.account-section.title")}

{user.nickname} ({user.username})
{user.email}

{t("setting.account-section.openapi-title")}