add day 42

This commit is contained in:
Zoe
2022-11-03 22:52:16 -05:00
parent 37da2156ad
commit 1ef5dd5b1f
45 changed files with 11370 additions and 0 deletions

20
day42/src/entry-client.ts Normal file
View File

@@ -0,0 +1,20 @@
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { appState, initAppState } from './main';
async function initClient() {
if (import.meta.env.SSR) return;
await initAppState();
await import('./style.css');
const { renderPage } = await import('./lib/router/pageRenderer');
await renderPage();
window.onpopstate = async (e: PopStateEvent) => {
if (e.state === null) {
return;
}
await renderPage();
};
}
await initClient();