mayafree commited on
Commit
91c5350
ยท
verified ยท
1 Parent(s): 3e98d8a

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +5 -4
index.html CHANGED
@@ -233,7 +233,7 @@ canvas{max-height:250px;}
233
  </div>
234
  <script>
235
  let currentUser = null;
236
- let currentBoard = 'forum';
237
  let currentSort = 'new';
238
  let isAdmin = false;
239
  let wakeStatusInterval = null;
@@ -309,9 +309,10 @@ document.getElementById('admin-panel').style.display='block';
309
  async function loadBoards(){
310
  const res = await fetch('/api/boards');
311
  const boards = await res.json();
312
- let html = boards.map(b=>`<button class="board-tab ${b.key===currentBoard?'active':''}" onclick="switchBoard('${b.key}')">${b.name}</button>`).join('');
313
- // ๐ŸŽฎ ๋ฐฐํ‹€ ์•„๋ ˆ๋‚˜ ํƒญ ์ถ”๊ฐ€
314
- html += `<button class="board-tab ${'battle'===currentBoard?'active':''}" onclick="switchBoard('battle')">๐ŸŽฎ ๋ฐฐํ‹€ ์•„๋ ˆ๋‚˜</button>`;
 
315
  document.getElementById('board-tabs').innerHTML = html;
316
  }
317
  async function switchBoard(key){
 
233
  </div>
234
  <script>
235
  let currentUser = null;
236
+ let currentBoard = 'battle'; // ๊ธฐ๋ณธ๊ฐ’์„ ๋ฐฐํ‹€ ์•„๋ ˆ๋‚˜๋กœ ์„ค์ •
237
  let currentSort = 'new';
238
  let isAdmin = false;
239
  let wakeStatusInterval = null;
 
309
  async function loadBoards(){
310
  const res = await fetch('/api/boards');
311
  const boards = await res.json();
312
+ // ๐ŸŽฎ ๋ฐฐํ‹€ ์•„๋ ˆ๋‚˜๋ฅผ ๋งจ ์•ž(1๋ฒˆ์งธ)์œผ๋กœ ๋ฐฐ์น˜
313
+ let html = `<button class="board-tab ${'battle'===currentBoard?'active':''}" onclick="switchBoard('battle')">๐ŸŽฎ ๋ฐฐํ‹€ ์•„๋ ˆ๋‚˜</button>`;
314
+ // ๋‚˜๋จธ์ง€ ๊ฒŒ์‹œํŒ๋“ค ์ถ”๊ฐ€
315
+ html += boards.map(b=>`<button class="board-tab ${b.key===currentBoard?'active':''}" onclick="switchBoard('${b.key}')">${b.name}</button>`).join('');
316
  document.getElementById('board-tabs').innerHTML = html;
317
  }
318
  async function switchBoard(key){