mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-06-30 22:06:38 -04:00
detatch theme provider from stitches logic
This commit is contained in:
@ -1,9 +1,7 @@
|
||||
import Head from "next/head";
|
||||
import Header from "../Header";
|
||||
import Footer from "../Footer";
|
||||
import { SkipToContentLink, SkipToContentTarget } from "../SkipToContent";
|
||||
import useTheme from "../../hooks/useTheme";
|
||||
import { styled, theme, darkTheme } from "../../lib/styles/stitches.config";
|
||||
import { styled, theme } from "../../lib/styles/stitches.config";
|
||||
import type { ComponentPropsWithoutRef } from "react";
|
||||
|
||||
const Flex = styled("div", {
|
||||
@ -39,18 +37,8 @@ export type LayoutProps = ComponentPropsWithoutRef<typeof Flex> & {
|
||||
};
|
||||
|
||||
const Layout = ({ container = true, children, ...rest }: LayoutProps) => {
|
||||
const { activeTheme } = useTheme();
|
||||
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<meta
|
||||
// dynamically set browser theme color to match the background color; default to light for SSR
|
||||
name="theme-color"
|
||||
content={(activeTheme === "dark" ? darkTheme : theme)?.colors?.backgroundOuter?.value}
|
||||
/>
|
||||
</Head>
|
||||
|
||||
<SkipToContentLink />
|
||||
|
||||
<Flex {...rest}>
|
||||
|
Reference in New Issue
Block a user