add day 72
This commit is contained in:
18
day72/src/entry-client.ts
Normal file
18
day72/src/entry-client.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { 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();
|
||||
Reference in New Issue
Block a user