11import { createFileRoute } from '@tanstack/react-router'
22import { useEffect , useState } from 'react'
3- import type { PersistedTodosHandle } from '~/db/persisted-todos' ;
3+ import type { PersistedTodosHandle } from '~/db/persisted-todos'
44import { PersistedTodoDemo } from '~/components/PersistedTodoDemo'
5- import {
6-
7- createPersistedTodoCollection
8- } from '~/db/persisted-todos'
5+ import { createPersistedTodoCollection } from '~/db/persisted-todos'
96
107export const Route = createFileRoute ( `/wa-sqlite` ) ( {
118 component : WASQLiteDemo ,
@@ -32,7 +29,9 @@ function WASQLiteDemo() {
3229 if ( ! disposed ) {
3330 console . error ( `Failed to initialize wa-sqlite persistence:` , err )
3431 setError (
35- err instanceof Error ? err . message : `Failed to initialize persistence` ,
32+ err instanceof Error
33+ ? err . message
34+ : `Failed to initialize persistence` ,
3635 )
3736 }
3837 } )
@@ -64,8 +63,8 @@ function WASQLiteDemo() {
6463 </ div >
6564 < p className = "mt-4 text-sm text-gray-500" >
6665 This feature requires a browser with OPFS support (Chrome 102+,
67- Edge 102+, Firefox 111+, Safari 15.2+) and a secure context
68- (HTTPS or localhost).
66+ Edge 102+, Firefox 111+, Safari 15.2+) and a secure context (HTTPS
67+ or localhost).
6968 </ p >
7069 </ div >
7170 </ div >
@@ -79,7 +78,9 @@ function WASQLiteDemo() {
7978 < div className = "max-w-2xl mx-auto p-6" >
8079 < div className = "bg-white rounded-lg shadow-lg p-6 text-center" >
8180 < div className = "animate-spin w-6 h-6 border-2 border-blue-500 border-t-transparent rounded-full mx-auto mb-2" />
82- < p className = "text-gray-600" > Initializing wa-sqlite persistence...</ p >
81+ < p className = "text-gray-600" >
82+ Initializing wa-sqlite persistence...
83+ </ p >
8384 </ div >
8485 </ div >
8586 </ div >
0 commit comments