Skip to content

Commit

Permalink
name change
Browse files Browse the repository at this point in the history
  • Loading branch information
anyaguuu committed Jul 16, 2023
1 parent bbaf2ae commit 4fe6363
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<title>Play!</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
5 changes: 3 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,14 @@ const App = () => {
const [level, setLevel] = useState(0);
const [streak, setStreak] = useState(0);

localStorage.setItem('streak', '0'); // store in local storage
localStorage.setItem('streak', JSON.stringify(0)); // store in local storage

useEffect(() => {
// retrieve from local storage
const storedStreak = localStorage.getItem('streak');
const storedStreak = JSON.parse(localStorage.getItem('streak'));
if (storedStreak) {
setStreak(Number(storedStreak));
console.log('streak is ', streak + 0);
}
}, []);

Expand Down

1 comment on commit 4fe6363

@vercel
Copy link

@vercel vercel bot commented on 4fe6363 Jul 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

24-1 – ./

24-1-anyaguuu.vercel.app
24-1-git-main-anyaguuu.vercel.app
24.anyagu.com

Please sign in to comment.