mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 03:34:40 +00:00
feat(Store): added store page
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import renderSvelte from '@/svelte-interface/main';
|
||||
import Store from '@/svelte-interface/pages/store.svelte'
|
||||
|
||||
import { unmount } from 'svelte'
|
||||
|
||||
export function renderStore() {
|
||||
const container = document.querySelector('#container');
|
||||
if (!container) {
|
||||
throw new Error('Container not found');
|
||||
}
|
||||
|
||||
const child = document.createElement('div');
|
||||
child.id = 'store';
|
||||
container!.appendChild(child);
|
||||
|
||||
const shadow = child.attachShadow({ mode: 'open' });
|
||||
const app = renderSvelte(Store, shadow);
|
||||
|
||||
return () => unmount(app)
|
||||
}
|
||||
Reference in New Issue
Block a user