Skip to content

Commit d482a36

Browse files
authored
Update account.html
1 parent 54e0859 commit d482a36

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/account.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,9 @@
9797
window.onload = async function () {
9898
try {
9999
if (localStorage.getItem('loggedIn') === 'true') {
100-
const usernameEncoded = localStorage.getItem('username');
100+
const usernameEncoded = localStorage.getItem('usernameEnc');
101101
const username = decodeUsername(usernameEncoded); // Decode the username using atob
102+
localStorage.setItem('username', username)
102103

103104
document.getElementById('authSection').style.display = 'none';
104105
document.getElementById('loggedInContent').style.display = 'block';
@@ -127,7 +128,7 @@
127128

128129
if (username) {
129130
const decodedUsername = decodeUsername(username); // Decode the username using atob
130-
localStorage.setItem('username', username); // Store the original Base64-encoded username
131+
localStorage.setItem('usernameEnc', username); // Store the original Base64-encoded username
131132
localStorage.setItem('loggedIn', 'true');
132133
window.location.href = 'index.html';
133134
}

0 commit comments

Comments
 (0)