fix: Home page todays lessons not properly changing days #310

This commit is contained in:
SethBurkart123
2025-06-18 09:41:21 +10:00
parent 3f0d3f87fe
commit fbd8d9e9e8
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -81,7 +81,7 @@ function createHomeButton(fragment: DocumentFragment, _: HTMLElement) {
container.append(div);
const NewButton = stringToHTML(
'<li class="item" data-key="home" id="homebutton" data-path="/home" data-betterseqta="true"><label><svg style="width:24px;height:24px" viewBox="0 0 24 24"><path fill="currentColor" d="M10,20V14H14V20H19V12H22L12,3L2,12H5V20H10Z" /></svg><span>Home</span></label></li>',
/* html */`<li class="item" data-key="home" id="homebutton" data-path="/home" data-betterseqta="true"><label><svg style="width:24px;height:24px" viewBox="0 0 24 24"><path fill="currentColor" d="M10,20V14H14V20H19V12H22L12,3L2,12H5V20H10Z" /></svg><span>Home</span></label></li>`
);
if (NewButton.firstChild) {
fragment.appendChild(NewButton.firstChild);
+3
View File
@@ -25,6 +25,9 @@ let currentSelectedDate = new Date();
export async function loadHomePage() {
console.info("[BetterSEQTA+] Started Loading Home Page");
// Reset currentSelectedDate to today when remounting the home page
currentSelectedDate = new Date();
// Wait for the DOM to finish clearing
await delay(10);