Skip to content

Commit

Permalink
Merge pull request #197 from DevKor-github/fix/localstorage
Browse files Browse the repository at this point in the history
Fix/localstorage
  • Loading branch information
tjrdnjs1534 authored Sep 9, 2024
2 parents 2b21867 + b07c6d0 commit 2d38374
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/signup/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ export default function SignUp() {
setProgress((prev) => prev + 1);
break;
case 3:
const inviteCode = sessionStorage.getItem('invite-code');
sessionStorage.removeItem('invite-code');
const inviteCode = localStorage.getItem('invite-code');
localStorage.removeItem('invite-code');
signup(
{
name: formState.nickname,
Expand Down
2 changes: 1 addition & 1 deletion libs/client/ParamProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function ParamProvider() {
const inviteCode = param.get('referer');

if (typeof window !== 'undefined' && inviteCode) {
sessionStorage.setItem('invite-code', inviteCode);
localStorage.setItem('invite-code', inviteCode);
}

return <></>;
Expand Down

0 comments on commit 2d38374

Please sign in to comment.