|
|
@ -1,6 +1,5 @@
|
|
|
|
import { useCallback, useEffect, useState } from "react";
|
|
|
|
import { useCallback, useEffect, useState } from "react";
|
|
|
|
import { useTranslation } from "react-i18next";
|
|
|
|
import { useTranslation } from "react-i18next";
|
|
|
|
import { useNavigate } from "react-router-dom";
|
|
|
|
|
|
|
|
import { useLocationStore, useMemoStore, useTagStore, useUserStore } from "../store/module";
|
|
|
|
import { useLocationStore, useMemoStore, useTagStore, useUserStore } from "../store/module";
|
|
|
|
import { getMemoStats } from "../helpers/api";
|
|
|
|
import { getMemoStats } from "../helpers/api";
|
|
|
|
import * as utils from "../helpers/utils";
|
|
|
|
import * as utils from "../helpers/utils";
|
|
|
@ -13,7 +12,6 @@ import "../less/user-banner.less";
|
|
|
|
|
|
|
|
|
|
|
|
const UserBanner = () => {
|
|
|
|
const UserBanner = () => {
|
|
|
|
const { t } = useTranslation();
|
|
|
|
const { t } = useTranslation();
|
|
|
|
const navigate = useNavigate();
|
|
|
|
|
|
|
|
const locationStore = useLocationStore();
|
|
|
|
const locationStore = useLocationStore();
|
|
|
|
const userStore = useUserStore();
|
|
|
|
const userStore = useUserStore();
|
|
|
|
const memoStore = useMemoStore();
|
|
|
|
const memoStore = useMemoStore();
|
|
|
@ -66,7 +64,8 @@ const UserBanner = () => {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const handleSignOutBtnClick = async () => {
|
|
|
|
const handleSignOutBtnClick = async () => {
|
|
|
|
navigate("/auth");
|
|
|
|
await userStore.doSignOut();
|
|
|
|
|
|
|
|
window.location.href = "/auth";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|