From 8c0c37d31b83af07bd5d81be323c7e26212bcf49 Mon Sep 17 00:00:00 2001 From: YamaD Date: Mon, 15 Jul 2024 22:32:07 +0900 Subject: [PATCH] right nav --- src/app/(main)/(narrow)/RightNav.tsx | 28 +++++++++++++++-- .../(wide)/settings/SettingsSectionBar.tsx | 24 ++++++++++++++ src/app/(main)/(wide)/settings/layout.tsx | 25 +-------------- src/app/(main)/(wide)/settings/ui/page.tsx | 4 +++ src/components/html/H3.tsx | 5 +++ src/features/settings/index.ts | 31 ++++++++++--------- 6 files changed, 76 insertions(+), 41 deletions(-) create mode 100644 src/app/(main)/(wide)/settings/SettingsSectionBar.tsx create mode 100644 src/components/html/H3.tsx diff --git a/src/app/(main)/(narrow)/RightNav.tsx b/src/app/(main)/(narrow)/RightNav.tsx index 4899f5c..be0447d 100644 --- a/src/app/(main)/(narrow)/RightNav.tsx +++ b/src/app/(main)/(narrow)/RightNav.tsx @@ -1,11 +1,20 @@ +"use client" + import clsx from "clsx" +import { Fragment } from "react" +import { useSettings } from "~/features/settings" export default function RightNav() { - const w = "w-72 xl:w-96 " + const [settings] = useSettings() + + const w = "w-72 xl:w-96" return (
- + {settings.ui.rnav.map( + (item, i) => + item in items && {items[item as keyof typeof items]()}, + )}
minskeyについて @@ -21,3 +30,18 @@ export default function RightNav() {
) } + +const items = { + search: SearchBar, + aichan: AiChan, +} + +// todo: impl +function SearchBar() { + return +} + +// todo: track eyes +function AiChan() { + return