diff --git a/src/components/AccountButton.tsx b/src/components/AccountButton.tsx new file mode 100644 index 0000000..3e3299b --- /dev/null +++ b/src/components/AccountButton.tsx @@ -0,0 +1,10 @@ +import isVip from "../utils/isVip" + +export default function AccountButton() { + return ( + +
+
{isVip().level==100?'管理站点':'我的账户'}
+
+ ) +} diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index 5a8f745..7aa80fc 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -1,12 +1,12 @@ import { useLocation, useNavigate } from "react-router-dom" // import { useLocation } from 'react-router'; import list from '../utils/router'; +import AccountButton from "./AccountButton"; // import { useState } from 'react' // import { Alert } from 'antd'; // import { useState } from "react"; // import { motion } from "framer-motion" -import isVip from "../utils/isVip" export default function Navbar() { const navigate = useNavigate(); @@ -93,10 +93,7 @@ export default function Navbar() {
:'' } */} {/* */} - -
-
{isVip().level==100?'管理站点':'我的账户'}
-
+ {/* */} {/*
diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 72a6658..198a97e 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -5,6 +5,7 @@ import { CopyToClipboard } from 'react-copy-to-clipboard'; import list from '../utils/router' // import FollowMe from '../components/FollowMe'; import isVip from '../utils/isVip'; +import AccountButton from "../components/AccountButton"; export default function index() { const navigate = useNavigate(); @@ -75,10 +76,13 @@ export default function index() {
- + {/*
我的账户
-
+ */} +
+ +
已完成