-
-
/
-
+
+
+
+ Sign in to your account
+
-
-
);
diff --git a/components/icons/github.tsx b/components/icons/github.tsx
new file mode 100644
index 0000000..082539d
--- /dev/null
+++ b/components/icons/github.tsx
@@ -0,0 +1,22 @@
+export default function IconGithub(props: { className : string}) {
+
+ const { className } = props;
+
+ return (
+
+ );
+}
diff --git a/components/sidebar.tsx b/components/sidebar.tsx
new file mode 100644
index 0000000..af8fb85
--- /dev/null
+++ b/components/sidebar.tsx
@@ -0,0 +1,31 @@
+"use client"
+
+import { useState } from "react";
+
+export default function Sidebar() {
+ const [currentMenu, setCurrentMenu] = useState("problems");
+
+ const handleClick = (name: string) => {
+ setCurrentMenu(name);
+ };
+
+ console.log("currentMenu", currentMenu);
+
+ return (
+
+
代码质量
+
+
handleClick("problems")}
+ >
+ 规范检测
+
+
+
+ );
+}
diff --git a/package.json b/package.json
index 108b110..836e0c9 100644
--- a/package.json
+++ b/package.json
@@ -10,6 +10,7 @@
"lint": "next lint"
},
"dependencies": {
+ "@headlessui/react": "^2.0.4",
"@toolkit-fe/request": "^0.1.22",
"next": "14.2.1",
"react": "^18",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 399023a..ae9adde 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -5,6 +5,9 @@ settings:
excludeLinksFromLockfile: false
dependencies:
+ '@headlessui/react':
+ specifier: ^2.0.4
+ version: 2.0.4(react-dom@18.2.0)(react@18.2.0)
'@toolkit-fe/request':
specifier: ^0.1.22
version: 0.1.22
@@ -103,6 +106,62 @@ packages:
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dev: true
+ /@floating-ui/core@1.6.2:
+ resolution: {integrity: sha512-+2XpQV9LLZeanU4ZevzRnGFg2neDeKHgFLjP6YLW+tly0IvrhqT4u8enLGjLH3qeh85g19xY5rsAusfwTdn5lg==}
+ dependencies:
+ '@floating-ui/utils': 0.2.2
+ dev: false
+
+ /@floating-ui/dom@1.6.5:
+ resolution: {integrity: sha512-Nsdud2X65Dz+1RHjAIP0t8z5e2ff/IRbei6BqFrl1urT8sDVzM1HMQ+R0XcU5ceRfyO3I6ayeqIfh+6Wb8LGTw==}
+ dependencies:
+ '@floating-ui/core': 1.6.2
+ '@floating-ui/utils': 0.2.2
+ dev: false
+
+ /@floating-ui/react-dom@2.1.0(react-dom@18.2.0)(react@18.2.0):
+ resolution: {integrity: sha512-lNzj5EQmEKn5FFKc04+zasr09h/uX8RtJRNj5gUXsSQIXHVWTVh+hVAg1vOMCexkX8EgvemMvIFpQfkosnVNyA==}
+ peerDependencies:
+ react: '>=16.8.0'
+ react-dom: '>=16.8.0'
+ dependencies:
+ '@floating-ui/dom': 1.6.5
+ react: 18.2.0
+ react-dom: 18.2.0(react@18.2.0)
+ dev: false
+
+ /@floating-ui/react@0.26.16(react-dom@18.2.0)(react@18.2.0):
+ resolution: {integrity: sha512-HEf43zxZNAI/E781QIVpYSF3K2VH4TTYZpqecjdsFkjsaU1EbaWcM++kw0HXFffj7gDUcBFevX8s0rQGQpxkow==}
+ peerDependencies:
+ react: '>=16.8.0'
+ react-dom: '>=16.8.0'
+ dependencies:
+ '@floating-ui/react-dom': 2.1.0(react-dom@18.2.0)(react@18.2.0)
+ '@floating-ui/utils': 0.2.2
+ react: 18.2.0
+ react-dom: 18.2.0(react@18.2.0)
+ tabbable: 6.2.0
+ dev: false
+
+ /@floating-ui/utils@0.2.2:
+ resolution: {integrity: sha512-J4yDIIthosAsRZ5CPYP/jQvUAQtlZTTD/4suA08/FEnlxqW3sKS9iAhgsa9VYLZ6vDHn/ixJgIqRQPotoBjxIw==}
+ dev: false
+
+ /@headlessui/react@2.0.4(react-dom@18.2.0)(react@18.2.0):
+ resolution: {integrity: sha512-16d/rOLeYsFsmPlRmXGu8DCBzrWD0zV1Ccx3n73wN87yFu8Y9+X04zflv8EJEt9TAYRyLKOmQXUnOnqQl6NgpA==}
+ engines: {node: '>=10'}
+ peerDependencies:
+ react: ^18
+ react-dom: ^18
+ dependencies:
+ '@floating-ui/react': 0.26.16(react-dom@18.2.0)(react@18.2.0)
+ '@react-aria/focus': 3.17.1(react@18.2.0)
+ '@react-aria/interactions': 3.21.3(react@18.2.0)
+ '@tanstack/react-virtual': 3.5.0(react-dom@18.2.0)(react@18.2.0)
+ react: 18.2.0
+ react-dom: 18.2.0(react@18.2.0)
+ dev: false
+
/@humanwhocodes/config-array@0.11.14:
resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==}
engines: {node: '>=10.10.0'}
@@ -356,6 +415,71 @@ packages:
dev: true
optional: true
+ /@react-aria/focus@3.17.1(react@18.2.0):
+ resolution: {integrity: sha512-FLTySoSNqX++u0nWZJPPN5etXY0WBxaIe/YuL/GTEeuqUIuC/2bJSaw5hlsM6T2yjy6Y/VAxBcKSdAFUlU6njQ==}
+ peerDependencies:
+ react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0
+ dependencies:
+ '@react-aria/interactions': 3.21.3(react@18.2.0)
+ '@react-aria/utils': 3.24.1(react@18.2.0)
+ '@react-types/shared': 3.23.1(react@18.2.0)
+ '@swc/helpers': 0.5.5
+ clsx: 2.1.1
+ react: 18.2.0
+ dev: false
+
+ /@react-aria/interactions@3.21.3(react@18.2.0):
+ resolution: {integrity: sha512-BWIuf4qCs5FreDJ9AguawLVS0lV9UU+sK4CCnbCNNmYqOWY+1+gRXCsnOM32K+oMESBxilAjdHW5n1hsMqYMpA==}
+ peerDependencies:
+ react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0
+ dependencies:
+ '@react-aria/ssr': 3.9.4(react@18.2.0)
+ '@react-aria/utils': 3.24.1(react@18.2.0)
+ '@react-types/shared': 3.23.1(react@18.2.0)
+ '@swc/helpers': 0.5.5
+ react: 18.2.0
+ dev: false
+
+ /@react-aria/ssr@3.9.4(react@18.2.0):
+ resolution: {integrity: sha512-4jmAigVq409qcJvQyuorsmBR4+9r3+JEC60wC+Y0MZV0HCtTmm8D9guYXlJMdx0SSkgj0hHAyFm/HvPNFofCoQ==}
+ engines: {node: '>= 12'}
+ peerDependencies:
+ react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0
+ dependencies:
+ '@swc/helpers': 0.5.5
+ react: 18.2.0
+ dev: false
+
+ /@react-aria/utils@3.24.1(react@18.2.0):
+ resolution: {integrity: sha512-O3s9qhPMd6n42x9sKeJ3lhu5V1Tlnzhu6Yk8QOvDuXf7UGuUjXf9mzfHJt1dYzID4l9Fwm8toczBzPM9t0jc8Q==}
+ peerDependencies:
+ react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0
+ dependencies:
+ '@react-aria/ssr': 3.9.4(react@18.2.0)
+ '@react-stately/utils': 3.10.1(react@18.2.0)
+ '@react-types/shared': 3.23.1(react@18.2.0)
+ '@swc/helpers': 0.5.5
+ clsx: 2.1.1
+ react: 18.2.0
+ dev: false
+
+ /@react-stately/utils@3.10.1(react@18.2.0):
+ resolution: {integrity: sha512-VS/EHRyicef25zDZcM/ClpzYMC5i2YGN6uegOeQawmgfGjb02yaCX0F0zR69Pod9m2Hr3wunTbtpgVXvYbZItg==}
+ peerDependencies:
+ react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0
+ dependencies:
+ '@swc/helpers': 0.5.5
+ react: 18.2.0
+ dev: false
+
+ /@react-types/shared@3.23.1(react@18.2.0):
+ resolution: {integrity: sha512-5d+3HbFDxGZjhbMBeFHRQhexMFt4pUce3okyRtUVKbbedQFUrtXSBg9VszgF2RTeQDKDkMCIQDtz5ccP/Lk1gw==}
+ peerDependencies:
+ react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0
+ dependencies:
+ react: 18.2.0
+ dev: false
+
/@rushstack/eslint-patch@1.10.2:
resolution: {integrity: sha512-hw437iINopmQuxWPSUEvqE56NCPsiU8N4AYtfHmJFckclktzK9YQJieD3XkDCDH4OjL+C7zgPUh73R/nrcHrqw==}
dev: true
@@ -371,6 +495,21 @@ packages:
tslib: 2.6.2
dev: false
+ /@tanstack/react-virtual@3.5.0(react-dom@18.2.0)(react@18.2.0):
+ resolution: {integrity: sha512-rtvo7KwuIvqK9zb0VZ5IL7fiJAEnG+0EiFZz8FUOs+2mhGqdGmjKIaT1XU7Zq0eFqL0jonLlhbayJI/J2SA/Bw==}
+ peerDependencies:
+ react: ^16.8.0 || ^17.0.0 || ^18.0.0
+ react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0
+ dependencies:
+ '@tanstack/virtual-core': 3.5.0
+ react: 18.2.0
+ react-dom: 18.2.0(react@18.2.0)
+ dev: false
+
+ /@tanstack/virtual-core@3.5.0:
+ resolution: {integrity: sha512-KnPRCkQTyqhanNC0K63GBG3wA8I+D1fQuVnAvcBF8f13akOKeQp1gSbu6f77zCxhEk727iV5oQnbHLYzHrECLg==}
+ dev: false
+
/@toolkit-fe/request@0.1.22:
resolution: {integrity: sha512-7CREc4B2W1YSu5hTXbxa1NZ8jyRHWQVw3kuDyblq3IJtuxE56YiDQYLD9M7TNFj1RUpao0enky3gL94n/sNIiA==}
dev: false
@@ -753,6 +892,11 @@ packages:
resolution: {integrity: sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==}
dev: false
+ /clsx@2.1.1:
+ resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==}
+ engines: {node: '>=6'}
+ dev: false
+
/color-convert@2.0.1:
resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==}
engines: {node: '>=7.0.0'}
@@ -2671,6 +2815,10 @@ packages:
engines: {node: '>= 0.4'}
dev: true
+ /tabbable@6.2.0:
+ resolution: {integrity: sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==}
+ dev: false
+
/tailwindcss@3.4.3:
resolution: {integrity: sha512-U7sxQk/n397Bmx4JHbJx/iSOOv5G+II3f1kpLpY2QeUv5DcPdcTsYLlusZfq1NthHS1c1cZoyFmmkex1rzke0A==}
engines: {node: '>=14.0.0'}