-
Notifications
You must be signed in to change notification settings - Fork 0
refactor ui user #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| google-site-verification: google6ea4f563230cd745.html |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,9 @@ | ||
| import { Layout } from "antd"; | ||
| import { useMemo } from "react"; | ||
| const { Footer } = Layout; | ||
| const FooterNav = () => { | ||
| return <Footer className="bg-slate-200 text-center">©Copyright by dev3h 2023 </Footer>; | ||
| const currentYear = useMemo(() => new Date().getFullYear(), []); | ||
| return <Footer className="bg-slate-200 text-center">©Copyright by dev3h {currentYear} </Footer>; | ||
| }; | ||
|
|
||
| export default FooterNav; |
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -35,6 +35,16 @@ class groupServices { | |||||||
| console.log(error); | ||||||||
| } | ||||||||
| } | ||||||||
| static async getAllGroups() { | ||||||||
| try { | ||||||||
| const response = await axiosInstance.get(`/user/group`); | ||||||||
| const data = response.data; | ||||||||
| return data; | ||||||||
| } catch (error) { | ||||||||
| console.log(error); | ||||||||
|
||||||||
| console.log(error); | |
| console.log(error); | |
| return []; |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,6 +1,7 @@ | ||||||
| import { create } from "zustand"; | ||||||
| import postServices from "@/services/userServices/postServices"; | ||||||
| import userAuthServices from "@/services/authServices/userAuthServices"; | ||||||
| import groupServices from "@/services/userServices/groupServices"; | ||||||
|
|
||||||
| export const useUserAuthStore = create((set) => ({ | ||||||
| token: JSON.parse(localStorage.getItem("user"))?.token, | ||||||
|
|
@@ -28,6 +29,7 @@ export const useUserAuthStore = create((set) => ({ | |||||
|
|
||||||
| export const useUserStore = create((set) => ({ | ||||||
| groupCategories: [], | ||||||
| groups: [], | ||||||
| userIP: "", | ||||||
| setGroupCategories: (groupCategories) => set({ groupCategories }), | ||||||
| setUserIP: (userIP) => set({ userIP }), | ||||||
|
|
@@ -40,6 +42,15 @@ export const useUserStore = create((set) => ({ | |||||
| console.log(error); | ||||||
| } | ||||||
| }, | ||||||
| getAllGroups: async () => { | ||||||
| try { | ||||||
| const response = await groupServices.getAllGroups(); | ||||||
| set({ groups: response }); | ||||||
| } catch (error) { | ||||||
| console.log(error); | ||||||
| set({ groups: [] }); | ||||||
| } | ||||||
|
||||||
| } | |
| set({ groups: [] }); // Set to empty array on error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dropdown menu lacks keyboard navigation support and proper accessibility attributes. Users navigating with keyboards cannot access the category dropdown menu.
Consider adding:
role="navigation"to the menu containeraria-labelfor screen readerstabIndexattributes for keyboard focus management