From be7391ed2576060b3b9f30bcdac8d5b336e578b4 Mon Sep 17 00:00:00 2001 From: V Date: Mon, 29 Dec 2025 14:11:23 +0700 Subject: [PATCH 1/5] feat: add github on navbar --- src/components/Navbar.tsx | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index 34adef22..321f9a0b 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -143,34 +143,30 @@ export function Navbar({ children }: { children: React.ReactNode }) { ) const socialLinks = ( -
+
- + + + + - + - + - - + +
) From 1e16aa08580c4ba734c54f29bc0e13ae331e5650 Mon Sep 17 00:00:00 2001 From: V Date: Mon, 29 Dec 2025 14:47:24 +0700 Subject: [PATCH 2/5] feat: add dynamic github repo and aria label --- src/components/Navbar.tsx | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index 321f9a0b..edd7f49e 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -26,7 +26,7 @@ import { Unauthenticated, AuthLoading, } from '~/components/AuthComponents' -import { libraries } from '~/libraries' +import { libraries, findLibrary } from '~/libraries' import { useCapabilities } from '~/hooks/useCapabilities' import { GithubIcon } from '~/components/icons/GithubIcon' import { DiscordIcon } from '~/components/icons/DiscordIcon' @@ -39,9 +39,15 @@ export function Navbar({ children }: { children: React.ReactNode }) { const matches = useMatches() const capabilities = useCapabilities() - const Title = - [...matches].reverse().find((m) => m.staticData.Title)?.staticData.Title ?? - null + const { Title, library } = React.useMemo(() => { + const match = [...matches].reverse().find((m) => m.staticData.Title) + const libraryId = match?.params?.libraryId + + return { + Title: match?.staticData.Title ?? null, + library: libraryId ? findLibrary(libraryId) : null, + } + }, [matches]) const canAdmin = capabilities.includes('admin') @@ -145,8 +151,8 @@ export function Navbar({ children }: { children: React.ReactNode }) { const socialLinks = (
From 138ae84fa202e4f0957678b5f7eafff91ef53d46 Mon Sep 17 00:00:00 2001 From: V Date: Mon, 29 Dec 2025 15:09:37 +0700 Subject: [PATCH 3/5] fix: github url --- src/components/Navbar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index edd7f49e..c2d7a092 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -151,7 +151,7 @@ export function Navbar({ children }: { children: React.ReactNode }) { const socialLinks = (
From 0d565f14b619fcc043574890fba7b4b4503578f2 Mon Sep 17 00:00:00 2001 From: V Date: Tue, 30 Dec 2025 11:03:53 +0700 Subject: [PATCH 4/5] fix: default github url --- src/components/Navbar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index c2d7a092..ed9864e4 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -151,7 +151,7 @@ export function Navbar({ children }: { children: React.ReactNode }) { const socialLinks = (