type errors fixed

This commit is contained in:
Owen Rees
2023-06-12 16:26:29 +02:00
parent 3e0e846ba3
commit 8e421e5d11
+2 -2
View File
@@ -1,6 +1,6 @@
import { useEffect, useState } from "react";
import { Dispatch, SetStateAction, useEffect, useState } from "react";
function useDarkMode() {
function useDarkMode(): [string, Dispatch<SetStateAction<string>>] {
const [theme, setTheme] = useState(
typeof window !== "undefined" ? localStorage.theme : "dark"
);