Skip to content

Commit

Permalink
fix for clearing localStorage
Browse files Browse the repository at this point in the history
  • Loading branch information
RichForever committed Oct 22, 2024
1 parent b8b5392 commit 9b5f516
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/components/Todo.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
import React from 'react';
import React, {useEffect} from 'react';
import TodoWrapper from "./TodoWrapper";

const Todo = () => {

useEffect(() => {
const colorMode = localStorage.getItem('chakra-ui-color-mode')
if(colorMode && colorMode !== 'light') {
localStorage.setItem("chakra-ui-color-mode", "light");
}
}, []);
return (
<div>
<TodoWrapper />
Expand Down

0 comments on commit 9b5f516

Please sign in to comment.