Skip to content

Commit

Permalink
fix(theme): rename variable that is already declared
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonGolms committed Aug 30, 2022
1 parent 9d00704 commit 0feb530
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Theme/useTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { getThemeById, getThemeClasses, THEME_DEFAULT, ThemeId } from './theme.u

export const useTheme = () => {
const dispatch = useAppDispatch();
const themeId = useAppSelector(selectUserThemeId);
const userThemeId = useAppSelector(selectUserThemeId);

const setTheme = useCallback(
(themeId: ThemeId) => {
Expand All @@ -15,7 +15,7 @@ export const useTheme = () => {
[dispatch]
);

const theme = useMemo(() => getThemeById(themeId) || THEME_DEFAULT, [themeId]);
const theme = useMemo(() => getThemeById(userThemeId) || THEME_DEFAULT, [userThemeId]);

useEffect(() => {
// eslint-disable-next-line no-type-assertion/no-type-assertion
Expand Down

0 comments on commit 0feb530

Please sign in to comment.