update style

This commit is contained in:
ryanchristo 2026-08-06 10:52:02 -07:00
parent 7a386f5c14
commit 7736d5596c
No known key found for this signature in database
15 changed files with 188 additions and 24 deletions

View file

@ -1,10 +1,24 @@
"use client";
import Link from "next/link";
import { useContext } from "react";
import { ThemeContext } from "@contexts";
import { ThemeIcon } from "./icons";
import styles from "./Header.module.css";
const Header = () => {
const { darkTheme, setDarkTheme } = useContext(ThemeContext);
const toggleTheme = () => {
if (darkTheme) {
setDarkTheme(false);
} else {
setDarkTheme(true);
}
};
return (
<div className={styles.header}>
<div>
@ -31,6 +45,9 @@ const Header = () => {
</ul>
</div>
</div>
<button className={styles.button} onClick={toggleTheme}>
<ThemeIcon darkTheme={darkTheme} />
</button>
</div>
);
};