mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
05de4d83f3
* chore: header refactor. * fix: core imports * chore: refactor profile activity header and fix all other header imports. * fix: import fixes * chore: header refactor. * fix: app dir header reimplementation * fix: removing parllel headers * fix: adding route groups to handle pages * fix: disabling sentry for temp * chore: update default exports in layouts & headers for consistency. * fix: bugfixes * fix: build errors --------- Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com>
47 lines
1.7 KiB
TypeScript
47 lines
1.7 KiB
TypeScript
"use client";
|
|
|
|
import { ReactNode } from "react";
|
|
import { ThemeProvider, useTheme } from "next-themes";
|
|
import { SWRConfig } from "swr";
|
|
// ui
|
|
import { Toast } from "@plane/ui";
|
|
// constants
|
|
import { SWR_CONFIG } from "@/constants/swr-config";
|
|
// helpers
|
|
import { ASSET_PREFIX, resolveGeneralTheme } from "@/helpers/common.helper";
|
|
// lib
|
|
import { InstanceProvider } from "@/lib/instance-provider";
|
|
import { StoreProvider } from "@/lib/store-provider";
|
|
import { UserProvider } from "@/lib/user-provider";
|
|
// styles
|
|
import "./globals.css";
|
|
|
|
export default function RootLayout({ children }: { children: ReactNode }) {
|
|
// themes
|
|
const { resolvedTheme } = useTheme();
|
|
|
|
return (
|
|
<html lang="en">
|
|
<head>
|
|
<link rel="apple-touch-icon" sizes="180x180" href={`${ASSET_PREFIX}/favicon/apple-touch-icon.png`} />
|
|
<link rel="icon" type="image/png" sizes="32x32" href={`${ASSET_PREFIX}/favicon/favicon-32x32.png`} />
|
|
<link rel="icon" type="image/png" sizes="16x16" href={`${ASSET_PREFIX}/favicon/favicon-16x16.png`} />
|
|
<link rel="manifest" href={`${ASSET_PREFIX}/site.webmanifest.json`} />
|
|
<link rel="shortcut icon" href={`${ASSET_PREFIX}/favicon/favicon.ico`} />
|
|
</head>
|
|
<body className={`antialiased`}>
|
|
<ThemeProvider themes={["light", "dark"]} defaultTheme="system" enableSystem>
|
|
<Toast theme={resolveGeneralTheme(resolvedTheme)} />
|
|
<SWRConfig value={SWR_CONFIG}>
|
|
<StoreProvider>
|
|
<InstanceProvider>
|
|
<UserProvider>{children}</UserProvider>
|
|
</InstanceProvider>
|
|
</StoreProvider>
|
|
</SWRConfig>
|
|
</ThemeProvider>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|