diff --git a/src/components/button/SimpleButton.tsx b/src/components/button/SimpleButton.tsx index 8ac930d..2280700 100644 --- a/src/components/button/SimpleButton.tsx +++ b/src/components/button/SimpleButton.tsx @@ -4,30 +4,31 @@ import Link from "next/link"; import { ReactNode } from "react"; interface Props { - icon: ReactNode; - link?: string; - className?: string; - disabled?: boolean; + icon: ReactNode; + link?: string; + className?: string; + disabled?: boolean; } export default function SimpleButton(props: Props) { - return ( - - ) -} \ No newline at end of file + return ( + + ); +} diff --git a/src/components/button/ThemeButton.tsx b/src/components/button/ThemeButton.tsx index f574782..f9097a9 100644 --- a/src/components/button/ThemeButton.tsx +++ b/src/components/button/ThemeButton.tsx @@ -1,38 +1,39 @@ -import { useState, useEffect } from 'react' -import { useTheme } from 'next-themes' -import { SunIcon } from '@components/icons/SunIcon'; -import { MoonIcon } from '@components/icons/MoonIcon'; +import { useState, useEffect } from "react"; +import { useTheme } from "next-themes"; +import { SunIcon } from "@components/icons/SunIcon"; +import { MoonIcon } from "@components/icons/MoonIcon"; export default function ThemeSwitch() { - const [mounted, setMounted] = useState(false); - const { theme, setTheme } = useTheme(); + const [mounted, setMounted] = useState(false); + const { theme, setTheme } = useTheme(); - // useEffect only runs on the client, so now we can safely show the UI - useEffect(() => { - setMounted(true) - }, []) + // useEffect only runs on the client, so now we can safely show the UI + useEffect(() => { + setMounted(true); + }, []); - if (!mounted) { - return null - } + if (!mounted) { + return null; + } - function switchTheme() { - if (theme === 'light') { - setTheme('dark'); - } else { - setTheme('light'); - } + function switchTheme() { + if (theme === "light") { + setTheme("dark"); + } else { + setTheme("light"); } + } - return ( - - - ); -} \ No newline at end of file + return ( + + ); +} diff --git a/src/components/countdown/CountDown.tsx b/src/components/countdown/CountDown.tsx index 8874cb3..2232531 100644 --- a/src/components/countdown/CountDown.tsx +++ b/src/components/countdown/CountDown.tsx @@ -3,13 +3,12 @@ import { useEffect, useState } from "react"; import NumberBox from "./NumberBox"; interface time { - days: number | string; - hours: number | string; - minutes: number | string; - seconds: number | string; + days: number | string; + hours: number | string; + minutes: number | string; + seconds: number | string; } - /** * CountDown component * @returns {JSX.Element} The Countdown element @@ -19,81 +18,87 @@ interface time { * ``` */ export default function Countdown(): JSX.Element { - const toDay = dayjs(); - const christmasDate = dayjs(`${dayjs().get('year')}-12-24`); - const [timeBeforeChristmas, setTimeBeforeChristmas] = useState