Skip to content

Commit 4b32502

Browse files
authored
Update index.html
1 parent 9082f7a commit 4b32502

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

index.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
</ul>
128128
<ul>
129129
<li><a href="https://scratch-coding-hut.github.io/messages">Messages</a></li>
130-
<li><a href="https://scratch-coding-hut.github.io/account">My Account</a></li>
130+
<li><a id="user" href="https://scratch-coding-hut.github.io/account">My Account</a></li>
131131
</ul>
132132
</div>
133133
</nav>
@@ -139,6 +139,10 @@ <h2 style="text-align:center;">Welcome to the official Coding Hut website.</h2>
139139
You can learn more about Coding Hut on our About page.
140140

141141
<script>
142+
if (localStorage.getItem('username')) {
143+
document.getElementById('user').textContent = localStorage.getItem('username');
144+
}
145+
142146
function toggleMenu() {
143147
var menu = document.querySelector('.menu');
144148
menu.style.display = menu.style.display === 'flex' ? 'none' : 'flex';

0 commit comments

Comments
 (0)