From 808477b55198fd46f321068f1db096e3194c924c Mon Sep 17 00:00:00 2001 From: Pontus Abrahamsson Date: Sat, 2 Dec 2023 12:10:35 +0100 Subject: [PATCH] Theme --- apps/dashboard/next.config.mjs | 2 +- apps/dashboard/src/app/layout.tsx | 10 ++-------- apps/website/next.config.mjs | 2 +- apps/website/src/app/[locale]/layout.tsx | 5 ++++- apps/website/src/app/[locale]/page.tsx | 14 +------------- apps/website/src/app/layout.tsx | 13 ++----------- apps/website/src/components/theme-provider.tsx | 1 + 7 files changed, 12 insertions(+), 35 deletions(-) diff --git a/apps/dashboard/next.config.mjs b/apps/dashboard/next.config.mjs index e987c2a4b6..7c3f5bcbdc 100644 --- a/apps/dashboard/next.config.mjs +++ b/apps/dashboard/next.config.mjs @@ -22,7 +22,7 @@ const config = { }, ], }, - transpilePackages: ["@midday/ui", "@midday/jobs"], + transpilePackages: ["@midday/ui", "@midday/jobs", "@midday/tailwind"], eslint: { ignoreDuringBuilds: true, }, diff --git a/apps/dashboard/src/app/layout.tsx b/apps/dashboard/src/app/layout.tsx index a9aaf4067c..2999cc3e85 100644 --- a/apps/dashboard/src/app/layout.tsx +++ b/apps/dashboard/src/app/layout.tsx @@ -3,7 +3,6 @@ import { ThemeProvider } from "@/components/theme-provider"; import "@/styles/globals.css"; import "@midday/ui/globals.css"; import { Toaster } from "@midday/ui/toaster"; -import { cn } from "@midday/ui/utils"; import type { Metadata } from "next"; import { Instrument_Sans } from "next/font/google"; import { type ReactElement, Suspense } from "react"; @@ -25,13 +24,8 @@ export const metadata: Metadata = { export default function Layout({ children }: { children: ReactElement }) { return ( - - + + {children} diff --git a/apps/website/next.config.mjs b/apps/website/next.config.mjs index 5f5b034aa1..181b2b9629 100644 --- a/apps/website/next.config.mjs +++ b/apps/website/next.config.mjs @@ -1,7 +1,7 @@ /** @type {import("next").NextConfig} */ const config = { reactStrictMode: true, - transpilePackages: ["@midday/ui", "@midday/tailwind", "@midday/location"], + transpilePackages: ["@midday/ui", "@midday/tailwind"], experimental: { // ppr: true, }, diff --git a/apps/website/src/app/[locale]/layout.tsx b/apps/website/src/app/[locale]/layout.tsx index 71997fc593..fb08772f2d 100644 --- a/apps/website/src/app/[locale]/layout.tsx +++ b/apps/website/src/app/[locale]/layout.tsx @@ -4,6 +4,9 @@ import { Provider } from "./provider"; export default function Layout({ params: { locale }, children, -}: { params: { locale: string }; children: ReactNode }) { +}: { + params: { locale: string }; + children: ReactNode; +}) { return {children}; } diff --git a/apps/website/src/app/[locale]/page.tsx b/apps/website/src/app/[locale]/page.tsx index 13d76f0a19..7be486734e 100644 --- a/apps/website/src/app/[locale]/page.tsx +++ b/apps/website/src/app/[locale]/page.tsx @@ -1,17 +1,5 @@ import { StartPage } from "@/components/startpage"; -import { getStaticParams } from "@/locales/server"; -import { setStaticParamsLocale } from "next-international/server"; - -export function generateStaticParams() { - return getStaticParams(); -} - -export default function Page({ - params: { locale }, -}: { - params: { locale: string }; -}) { - setStaticParamsLocale(locale); +export default function Page() { return ; } diff --git a/apps/website/src/app/layout.tsx b/apps/website/src/app/layout.tsx index 8110c894f9..2a07e31011 100644 --- a/apps/website/src/app/layout.tsx +++ b/apps/website/src/app/layout.tsx @@ -24,17 +24,8 @@ export const metadata: Metadata = { export default function Layout({ children }: { children: ReactElement }) { return ( - - - {children} - + + {children} diff --git a/apps/website/src/components/theme-provider.tsx b/apps/website/src/components/theme-provider.tsx index 5c596f24a9..f54bfa83a1 100644 --- a/apps/website/src/components/theme-provider.tsx +++ b/apps/website/src/components/theme-provider.tsx @@ -2,6 +2,7 @@ import { ThemeProvider as NextThemesProvider } from "next-themes"; import * as React from "react"; + type ThemeProviderProps = Parameters[0]; export function ThemeProvider({ children, ...props }: ThemeProviderProps) {