Skip to content

Commit dc17281

Browse files
ci: apply automated fixes
1 parent 185c965 commit dc17281

2 files changed

Lines changed: 13 additions & 14 deletions

File tree

examples/react/offline-transactions/src/components/PersistedTodoDemo.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ export function PersistedTodoDemo({ collection }: PersistedTodoDemoProps) {
1212
const [error, setError] = useState<string | null>(null)
1313

1414
const { data: todoList = [] } = useLiveQuery((q) =>
15-
q
16-
.from({ todo: collection })
17-
.orderBy(({ todo }) => todo.createdAt, `desc`),
15+
q.from({ todo: collection }).orderBy(({ todo }) => todo.createdAt, `desc`),
1816
)
1917

2018
const handleAddTodo = () => {
@@ -171,10 +169,10 @@ export function PersistedTodoDemo({ collection }: PersistedTodoDemoProps) {
171169
<ol className="text-sm text-gray-600 space-y-1">
172170
<li>1. Add some todos</li>
173171
<li>2. Refresh the page (Ctrl+R / Cmd+R)</li>
174-
<li>3. Your todos are still here - persisted in SQLite via OPFS!</li>
175172
<li>
176-
4. This uses wa-sqlite with OPFSCoopSyncVFS in a Web Worker
173+
3. Your todos are still here - persisted in SQLite via OPFS!
177174
</li>
175+
<li>4. This uses wa-sqlite with OPFSCoopSyncVFS in a Web Worker</li>
178176
</ol>
179177
</div>
180178
</div>

examples/react/offline-transactions/src/routes/wa-sqlite.tsx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
import { createFileRoute } from '@tanstack/react-router'
22
import { useEffect, useState } from 'react'
3-
import type {PersistedTodosHandle} from '~/db/persisted-todos';
3+
import type { PersistedTodosHandle } from '~/db/persisted-todos'
44
import { PersistedTodoDemo } from '~/components/PersistedTodoDemo'
5-
import {
6-
7-
createPersistedTodoCollection
8-
} from '~/db/persisted-todos'
5+
import { createPersistedTodoCollection } from '~/db/persisted-todos'
96

107
export 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

Comments
 (0)