Skip to content

Commit 9dd8a77

Browse files
committed
remove hard-coded base url
1 parent 7a18db4 commit 9dd8a77

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

dashboard/src/pages/cloud/tenants/ledgers/documents.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import React, { useContext } from "react";
22
// import { rawConnect } from "@fireproof/cloud";
33
import { Link, useNavigate, useParams } from "react-router-dom";
44
import { toCloud, useFireproof } from "use-fireproof";
5+
import { SimpleTokenStrategy } from "../../../../../../core/gateways/cloud/to-cloud.js";
56
import { AppContext } from "../../../../app-context.jsx";
67
import { Button } from "../../../../components/Button.jsx";
78
import { DynamicTable } from "../../../../components/DynamicTable.jsx";
89
import { headersForDocs } from "../../../../components/dynamicTableHelpers.js";
9-
import { SimpleTokenStrategy } from "../../../../../../core/gateways/cloud/to-cloud.js";
1010
// import { DEFAULT_ENDPOINT } from "../../../../helpers.js";
1111

1212
interface Document {
@@ -33,16 +33,14 @@ export function LedgerDocuments() {
3333
function 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

Comments
 (0)