Run prettier through everything.

This commit is contained in:
muzam1l
2022-08-17 11:50:49 +05:30
parent 9923dd9390
commit 6418094b0f
110 changed files with 5458 additions and 5951 deletions

View File

@@ -1,34 +1,34 @@
import { useState, useEffect } from "react";
import { useTheme } from "next-themes";
import { Sun, Moon } from "phosphor-react";
import { useState, useEffect } from 'react'
import { useTheme } from 'next-themes'
import { Sun, Moon } from 'phosphor-react'
import Button from "./Button";
import Button from './Button'
const ThemeChanger = () => {
const { theme, setTheme } = useTheme();
const [mounted, setMounted] = useState(false);
useEffect(() => setMounted(true), []);
const { theme, setTheme } = useTheme()
const [mounted, setMounted] = useState(false)
useEffect(() => setMounted(true), [])
if (!mounted) return null;
if (!mounted) return null
return (
<Button
outline
onClick={() => {
setTheme(theme && theme === "light" ? "dark" : "light");
setTheme(theme && theme === 'light' ? 'dark' : 'light')
}}
css={{
display: "flex",
marginLeft: "auto",
cursor: "pointer",
alignItems: "center",
justifyContent: "center",
color: "$muted",
display: 'flex',
marginLeft: 'auto',
cursor: 'pointer',
alignItems: 'center',
justifyContent: 'center',
color: '$muted'
}}
>
{theme === "dark" ? <Sun size="15px" /> : <Moon size="15px" />}
{theme === 'dark' ? <Sun size="15px" /> : <Moon size="15px" />}
</Button>
);
};
)
}
export default ThemeChanger;
export default ThemeChanger