new features
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import { JSX } from "react"
|
||||
|
||||
import { ProfilePage } from "@pages/ProfilePage"
|
||||
|
||||
export default function Profile(): JSX.Element {
|
||||
return (
|
||||
<main>
|
||||
<ProfilePage />
|
||||
</main>
|
||||
)
|
||||
}
|
||||
+8
-1
@@ -24,7 +24,14 @@ export default function RootLayout({
|
||||
children: ReactNode
|
||||
}>) {
|
||||
return (
|
||||
<html lang="ru" className={open_sans.variable}>
|
||||
<html lang="ru" className={open_sans.variable} suppressHydrationWarning>
|
||||
<head>
|
||||
<script
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: `(function(){try{var t=localStorage.getItem("theme");var d;if(t==="light"||t==="dark"){d=t}else{d=window.matchMedia("(prefers-color-scheme:dark)").matches?"dark":"light"}document.documentElement.setAttribute("data-theme",d);document.documentElement.classList.add(d)}catch(e){document.documentElement.setAttribute("data-theme","light");document.documentElement.classList.add("light")}})()`,
|
||||
}}
|
||||
/>
|
||||
</head>
|
||||
<body>
|
||||
<AppProviders>{children}</AppProviders>
|
||||
</body>
|
||||
|
||||
@@ -1,10 +1,23 @@
|
||||
"use client"
|
||||
|
||||
import { usePathname } from "next/navigation"
|
||||
|
||||
import { Header } from "@widgets/Header"
|
||||
|
||||
const AUTH_ROUTES = ["/login", "/register", "/under_maintenance"]
|
||||
|
||||
export default function EssentialTemplate({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode
|
||||
}) {
|
||||
const pathname = usePathname()
|
||||
const isAuthPage = AUTH_ROUTES.includes(pathname)
|
||||
|
||||
if (isAuthPage) {
|
||||
return <>{children}</>
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Header />
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
import { UnderMaintenancePage } from "@pages/UnderMaintenancePage"
|
||||
|
||||
export default function UnderMaintenance() {
|
||||
return (
|
||||
<main>
|
||||
<UnderMaintenancePage />
|
||||
</main>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user