We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc00184 commit f2d68feCopy full SHA for f2d68fe
app/hooks/useCatalog.ts
@@ -1,12 +1,14 @@
1
-import { useFireproof } from 'use-fireproof';
+import { useFireproof, toCloud } from 'use-fireproof';
2
import { useEffect, useMemo } from 'react';
3
import type { LocalVibe } from '../utils/vibeUtils';
4
5
export function useCatalog(userId: string, vibes: Array<LocalVibe>) {
6
if (!userId) throw new Error('No user ID provided');
7
8
const dbName = `vibe-catalog-${userId}`;
9
- const { database, useAllDocs } = useFireproof(dbName);
+ const { database, useAllDocs } = useFireproof(dbName, {
10
+ attach: toCloud()
11
+ });
12
13
// Get real-time count of cataloged vibes
14
const allDocsResult = useAllDocs() as {
0 commit comments