Skip to content

Commit 98afba9

Browse files
committed
Undo demo changes
1 parent 613aabc commit 98afba9

File tree

1 file changed

+5
-17
lines changed

1 file changed

+5
-17
lines changed

demos/react-supabase-todolist/src/components/providers/SystemProvider.tsx

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,7 @@ import { AppSchema, ListRecord, LISTS_TABLE, TODOS_TABLE } from '@/library/power
33
import { SupabaseConnector } from '@/library/powersync/SupabaseConnector';
44
import { CircularProgress } from '@mui/material';
55
import { PowerSyncContext } from '@powersync/react';
6-
import {
7-
createBaseLogger,
8-
DifferentialWatchedQuery,
9-
LogLevel,
10-
PowerSyncDatabase,
11-
SyncClientImplementation,
12-
WASQLiteOpenFactory,
13-
WASQLiteVFS
14-
} from '@powersync/web';
6+
import { createBaseLogger, DifferentialWatchedQuery, LogLevel, PowerSyncDatabase } from '@powersync/web';
157
import React, { Suspense } from 'react';
168
import { NavigationPanelContextProvider } from '../navigation/NavigationPanelContext';
179

@@ -20,13 +12,9 @@ export const useSupabase = () => React.useContext(SupabaseContext);
2012

2113
export const db = new PowerSyncDatabase({
2214
schema: AppSchema,
23-
database: new WASQLiteOpenFactory({
24-
dbFilename: 'example.db',
25-
vfs: WASQLiteVFS.OPFSCoopSyncVFS,
26-
flags: {
27-
enableMultiTabs: typeof SharedWorker !== 'undefined'
28-
}
29-
})
15+
database: {
16+
dbFilename: 'example.db'
17+
}
3018
});
3119

3220
export type EnhancedListRecord = ListRecord & { total_tasks: number; completed_tasks: number };
@@ -80,7 +68,7 @@ export const SystemProvider = ({ children }: { children: React.ReactNode }) => {
8068
const l = connector.registerListener({
8169
initialized: () => {},
8270
sessionStarted: () => {
83-
powerSync.connect(connector, { clientImplementation: SyncClientImplementation.RUST });
71+
powerSync.connect(connector);
8472
}
8573
});
8674

0 commit comments

Comments
 (0)