From 70c6079315a7018fe23ae7bfe02bed2d10163c9f Mon Sep 17 00:00:00 2001 From: Innei Date: Mon, 8 Jan 2024 19:45:09 +0800 Subject: [PATCH] fix: overflow Signed-off-by: Innei --- src/app/(dashboard)/dashboard.css | 2 +- src/app/(dashboard)/dashboard/comments/page.tsx | 2 +- src/components/layout/dashboard/Header.tsx | 12 ++++++++++-- .../dashboard/comments/CommentContentCell.tsx | 3 ++- .../modules/dashboard/comments/CommentMobileList.tsx | 7 ++++--- src/components/modules/dashboard/home/Version.tsx | 3 ++- 6 files changed, 20 insertions(+), 9 deletions(-) diff --git a/src/app/(dashboard)/dashboard.css b/src/app/(dashboard)/dashboard.css index 120581207e..1f5ccd5e14 100644 --- a/src/app/(dashboard)/dashboard.css +++ b/src/app/(dashboard)/dashboard.css @@ -12,7 +12,7 @@ *, *::before, *::after { - --bc: rgb(92, 92, 92); + --bc: rgb(60, 60, 60); } } diff --git a/src/app/(dashboard)/dashboard/comments/page.tsx b/src/app/(dashboard)/dashboard/comments/page.tsx index 485c34da12..eb1f724f48 100644 --- a/src/app/(dashboard)/dashboard/comments/page.tsx +++ b/src/app/(dashboard)/dashboard/comments/page.tsx @@ -51,7 +51,7 @@ export default function Page() { const [tab, setTab] = useRouterQueryState('tab', TABS[0].key) - const currentTab = tab.toString() + const currentTab = tab.toString() || TABS[0].key.toString() return (
diff --git a/src/components/layout/dashboard/Header.tsx b/src/components/layout/dashboard/Header.tsx index a9ac4bfd70..622644d806 100644 --- a/src/components/layout/dashboard/Header.tsx +++ b/src/components/layout/dashboard/Header.tsx @@ -4,7 +4,7 @@ import { useCallback } from 'react' import { m } from 'framer-motion' import { atom, useAtom, useSetAtom } from 'jotai' import Link from 'next/link' -import { usePathname } from 'next/navigation' +import { usePathname, useRouter } from 'next/navigation' import type { DashboardRoute } from '~/app/(dashboard)/routes' import type { MouseEventHandler, ReactNode } from 'react' @@ -22,11 +22,19 @@ import { ThemeToggle } from './ThemeToggle' export const LayoutHeader = () => { const title = useAggregationSelector((s) => s.seo.title) + const router = useRouter() return (
) + console.log(version, 'a') return (