add day14

This commit is contained in:
Zoe
2022-10-06 21:37:51 -05:00
parent 6855cb94f3
commit f3718a1229
32 changed files with 6369 additions and 56 deletions

19
day14/src/entry-client.js Normal file
View File

@@ -0,0 +1,19 @@
import { renderPage, hydratePage } from './lib/router';
import { isSSR, appState } from '/src/main';
export async function mount(mounted) {
eval(mounted)
}
if (!import.meta.env.SSR) {
// waits for the page to fully load to render the page from the virtDOM
if (document.getElementById('app').childNodes.length == 1) {
await import('/src/style.css')
await renderPage()
window.onpopstate = async () => {
await renderPage()
}
} else {
hydratePage()
}
}