@@ -2,11 +2,11 @@ import React, { useContext } from "react";
22// import { rawConnect } from "@fireproof/cloud";
33import { Link , useNavigate , useParams } from "react-router-dom" ;
44import { toCloud , useFireproof } from "use-fireproof" ;
5+ import { SimpleTokenStrategy } from "../../../../../../core/gateways/cloud/to-cloud.js" ;
56import { AppContext } from "../../../../app-context.jsx" ;
67import { Button } from "../../../../components/Button.jsx" ;
78import { DynamicTable } from "../../../../components/DynamicTable.jsx" ;
89import { headersForDocs } from "../../../../components/dynamicTableHelpers.js" ;
9- import { SimpleTokenStrategy } from "../../../../../../core/gateways/cloud/to-cloud.js" ;
1010// import { DEFAULT_ENDPOINT } from "../../../../helpers.js";
1111
1212interface Document {
@@ -33,16 +33,14 @@ export function LedgerDocuments() {
3333function LedgerDocumentsContent ( { tenantId, ledgerId, token } : { tenantId ?: string ; ledgerId ?: string ; token : string } ) {
3434 const navigate = useNavigate ( ) ;
3535
36- const { useLiveQuery, database, attach } = useFireproof ( ledgerId || "" , {
36+ const { useLiveQuery, database } = useFireproof ( ledgerId || "" , {
3737 attach : toCloud ( {
38- urls : { base : "fpcloud://localhost:8787?protocol=ws" } ,
3938 tenant : tenantId ,
4039 ledger : ledgerId ,
4140 strategy : new SimpleTokenStrategy ( token ) ,
4241 } ) ,
4342 } ) ;
4443
45-
4644 const allDocs = useLiveQuery < Document > ( "_id" ) ;
4745 const docs = allDocs . docs . filter ( ( doc ) => ! ! doc ) ;
4846 const headers = headersForDocs ( docs ) ;
0 commit comments