Removed remnants of app test
This commit is contained in:
parent
21e613891e
commit
aa2b288906
1 changed files with 0 additions and 76 deletions
|
@ -1,76 +0,0 @@
|
||||||
'use client'
|
|
||||||
import Script from "next/script"
|
|
||||||
import Footer from "../components/footer"
|
|
||||||
import Navbar from "../components/navbar"
|
|
||||||
import StyleSelector from "../components/themeselector"
|
|
||||||
import styles from "../styles/Home.module.css"
|
|
||||||
import { Page } from '../components/styles/generic'
|
|
||||||
import { DefaultTheme, ThemeProvider } from 'styled-components';
|
|
||||||
import { createContext, useContext, useEffect, useState } from "react"
|
|
||||||
import { setCookie } from "cookies-next"
|
|
||||||
import { darkTheme } from "../components/themes"
|
|
||||||
|
|
||||||
const ThemeUpdateContext = createContext(
|
|
||||||
(theme: DefaultTheme) => console.error("attempted to set theme outside of a ThemeUpdateContext.Provider")
|
|
||||||
)
|
|
||||||
|
|
||||||
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
||||||
export const useUpdateTheme = () => useContext(ThemeUpdateContext);
|
|
||||||
|
|
||||||
export default function Layout({ children, }: { children: React.ReactNode }) {
|
|
||||||
const [selectedTheme, setselectedTheme] = useState(darkTheme);
|
|
||||||
console.log("Selected Theme: ", selectedTheme); // DEBUG
|
|
||||||
|
|
||||||
|
|
||||||
return (
|
|
||||||
<html lang="en">
|
|
||||||
<ThemeProvider theme={selectedTheme}>
|
|
||||||
<ThemeUpdateContext.Provider value={setselectedTheme}>
|
|
||||||
<Page>
|
|
||||||
|
|
||||||
<Navbar />
|
|
||||||
<StyleSelector></StyleSelector>
|
|
||||||
<body className={styles.main}>
|
|
||||||
{children}
|
|
||||||
</body>
|
|
||||||
</Page>
|
|
||||||
</ThemeUpdateContext.Provider>
|
|
||||||
</ThemeProvider>
|
|
||||||
|
|
||||||
|
|
||||||
</html >
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
{/* <Page>
|
|
||||||
<Navbar />
|
|
||||||
<StyleSelector></StyleSelector>
|
|
||||||
<body className={styles.main}>
|
|
||||||
{children}
|
|
||||||
</body>
|
|
||||||
<Footer />
|
|
||||||
</Page> */}
|
|
||||||
|
|
||||||
/* <html>
|
|
||||||
<head />
|
|
||||||
<body>{children}</body>
|
|
||||||
</html> */
|
|
||||||
|
|
||||||
{/* <Script id="matomo_analytics">
|
|
||||||
{`
|
|
||||||
var _paq = window._paq = window._paq || []; */}
|
|
||||||
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
|
||||||
/* _paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
|
|
||||||
_paq.push(["setCookieDomain", "www.neshweb.net"]);
|
|
||||||
_paq.push(["disableCookies"]);
|
|
||||||
_paq.push(['trackPageView']);
|
|
||||||
_paq.push(['enableLinkTracking']);
|
|
||||||
(function() {
|
|
||||||
var u="//tracking.neshweb.net/";
|
|
||||||
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
|
||||||
_paq.push(['setSiteId', '2']);
|
|
||||||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
|
||||||
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
|
|
||||||
})();
|
|
||||||
`}
|
|
||||||
</Script> */
|
|
Loading…
Reference in a new issue