Skip to content

Commit

Permalink
sone dräck
Browse files Browse the repository at this point in the history
  • Loading branch information
Hazzeldorn committed Oct 28, 2023
1 parent 1f38660 commit 5605961
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions frontend/src/app/layout.js
@@ -1,27 +1,33 @@
"use client";

import { Inter } from "next/font/google";
import "./globals.css";
import "@/app/fonts/Tanker/Fonts/WEB/css/tanker.css";
import styles from "@/app/page.module.css";
import Header from "./components/Header/Header";
import { useEffect } from "react";

const inter = Inter({ subsets: ["latin"] });

/*
export const metadata = {
title: "Kick Ass Todo App",
description: "A Todo App where your todo's won't be forgotten.",
};

let colorClass = "";
/*
if (usePathname() === "/tinder") {
colorClass = "bgViolet";
}
*/

export default function RootLayout({ children }) {
useEffect(() => {
// i have absolutelly no idea how nextJS and routing stuff works
// therefore i inserted this little hacky effect here
if (window.location.pathname === "/tinder") {
document.body.classList.add("bgPurple");
}
}, []);

return (
<html lang="en">
<body className={`${colorClass} ${inter.className}`}>
<body className={inter.className}>
<Header title={`Your tasks`} />
<main className={styles.main}>
<div className={styles.main__inner}>{children}</div>
Expand Down

0 comments on commit 5605961

Please sign in to comment.