mirror of
https://github.com/10h30/astroplate.git
synced 2026-07-14 04:06:21 +09:00
format code
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
const useTheme = (): string => {
|
||||
const [themeValue, setThemeValue] = useState("");
|
||||
|
||||
useEffect(() => {
|
||||
setThemeValue(document.documentElement.classList.contains('dark')? 'dark' : 'light');
|
||||
setThemeValue(
|
||||
document.documentElement.classList.contains("dark") ? "dark" : "light"
|
||||
);
|
||||
}, []);
|
||||
|
||||
return themeValue;
|
||||
|
||||
Reference in New Issue
Block a user