Skip to content

Commit

Permalink
fix(): Rename hook.
Browse files Browse the repository at this point in the history
  • Loading branch information
aidanCQ committed Sep 9, 2024
1 parent 042377b commit 5e814ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/custom/theme-selector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React from "react";
import { Button } from "src/shadcn/ui/button";
import { getTheme, subscribeToTheme, setTheme } from "src/utils/darkMode";

export const useMode = () => {
export const useTheme = () => {
const [theme, _setLocalTheme] = React.useState(getTheme());

React.useEffect(() => {
Expand All @@ -16,7 +16,7 @@ export const useMode = () => {
return { theme, setMode: (_mode: typeof theme['mode']) => setTheme(_mode) }
}

export const ThemeSelector = ({theme, setMode}: ReturnType<typeof useMode>) => {
export const ThemeSelector = ({theme, setMode}: ReturnType<typeof useTheme>) => {

const stateMap = {
"light": {
Expand Down

0 comments on commit 5e814ba

Please sign in to comment.