From c54091d4bce4176c54cdcf14ab7a465b9fb274db Mon Sep 17 00:00:00 2001 From: Meng Zhang Date: Wed, 6 Dec 2023 22:41:35 +0800 Subject: [PATCH] refactor: extract dashboard layout (#952) * refactor: extract dashboard layout * fix formatting --- ee/tabby-ui/app/(dashboard)/layout.tsx | 10 +++++++++- ee/tabby-ui/app/layout.tsx | 6 +----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ee/tabby-ui/app/(dashboard)/layout.tsx b/ee/tabby-ui/app/(dashboard)/layout.tsx index cafd302..3889165 100644 --- a/ee/tabby-ui/app/(dashboard)/layout.tsx +++ b/ee/tabby-ui/app/(dashboard)/layout.tsx @@ -1,5 +1,6 @@ import { Metadata } from 'next' import Sidebar from './components/sidebar' +import { Header } from '@/components/header' export const metadata: Metadata = { title: 'Dashboard' @@ -10,5 +11,12 @@ interface DashboardLayoutProps { } export default function RootLayout({ children }: DashboardLayoutProps) { - return {children} + return ( + <> +
+
+ {children} +
+ + ) } diff --git a/ee/tabby-ui/app/layout.tsx b/ee/tabby-ui/app/layout.tsx index 5e9d258..bf1c7e1 100644 --- a/ee/tabby-ui/app/layout.tsx +++ b/ee/tabby-ui/app/layout.tsx @@ -7,7 +7,6 @@ import { fontMono, fontSans } from '@/lib/fonts' import { cn } from '@/lib/utils' import { TailwindIndicator } from '@/components/tailwind-indicator' import { Providers } from '@/components/providers' -import { Header } from '@/components/header' export const metadata: Metadata = { title: { @@ -38,10 +37,7 @@ export default function RootLayout({ children }: RootLayoutProps) { > -
-
-
{children}
-
+
{children}