From ea49f88e8216b1775ce0e3bfb8a49d766c803cd1 Mon Sep 17 00:00:00 2001 From: YuzeTT Date: Wed, 22 Nov 2023 01:08:00 +0800 Subject: [PATCH] chore: update navbar --- src/components/AccountButton.tsx | 10 ++++++++++ src/components/Navbar.tsx | 7 ++----- src/pages/index.tsx | 8 ++++++-- 3 files changed, 18 insertions(+), 7 deletions(-) create mode 100644 src/components/AccountButton.tsx 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() {
- + {/*
我的账户
-
+ */} +
+ +
已完成