From 75ae36b0b4ab0b9d166451b5c9220c57c8abd4d0 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Sun, 28 Apr 2024 16:27:52 +0200 Subject: [PATCH] fix: improve navigation around All languages/projects a bit --- src/app/page.tsx | 12 +++--------- src/components/Header.tsx | 40 +++++++++++++++++++++++++++++++++------ 2 files changed, 37 insertions(+), 15 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index 4136c92..84b71d3 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,19 +1,13 @@ import React from "react"; -import { getNileConfig } from "@/static/NileConfig"; import { LayoutCommon } from "@/components/LayoutCommon"; -import { ConfigProvider } from "@/providers/ConfigProvider"; import { MainPage } from "./MainPage"; export default async function Home() { - const nileConfig = await getNileConfig(); - return (
- - - - - + + +
); } diff --git a/src/components/Header.tsx b/src/components/Header.tsx index f1457fb..7a27585 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -34,9 +34,23 @@ export const Header = () => { )} {pathname.startsWith("/language/") && ( - + + + + + + + All projects + + {Object.keys(config.projects ?? {}).map((key) => ( + + {config.projects?.[key]?.name ?? ""} + + ))} + + )} {pathname.startsWith("/language/") && ( @@ -80,9 +94,23 @@ export const Header = () => { )} {pathname.startsWith("/project/") && ( - + + + + + + + All languages + + {Object.keys(config.languages ?? {}).map((key) => ( + + {config.languages?.[key]?.name ?? ""} ({key}) + + ))} + + )} {(pathname.startsWith("/translation/") || pathname.startsWith("/string/")) && (