This commit is contained in:
2024-06-12 14:34:28 +08:00
commit 5db4d61d64
20 changed files with 397 additions and 0 deletions

25
src/main.ts Normal file
View File

@@ -0,0 +1,25 @@
import './app.pcss';
import App from './App.svelte';
import type { Comment } from '@onecomme.com/onesdk/types/Comment';
import { chats } from './chats';
if (import.meta.env.DEV) {
globalThis.OneSDK = (await import('@onecomme.com/onesdk')).default;
}
OneSDK.subscribe({
action: 'comments',
callback: ((res: Comment[]) => {
chats.set(res);
}) as any
});
OneSDK.setup({
commentLimit: 30
});
OneSDK.connect();
const app = new App({
target: document.getElementById('app')!
});
export default app;