-
- }
- title="Warning"
- variant="warning"
- className="storageRequestReview-alert">
- If no suitable hosts are found for the CID {storageRequest.cid}{" "}
- matching your storage requirements, you will incur a charge a small
- amount of tokens.
-
-
+
+
);
}
diff --git a/src/components/StorageRequestSetup/purchase.util.ts b/src/components/StorageRequestSetup/purchase.util.ts
deleted file mode 100644
index e59ad4a..0000000
--- a/src/components/StorageRequestSetup/purchase.util.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { TabSortState } from "@codex-storage/marketplace-ui-components"
-import { CodexPurchase } from "@codex-storage/sdk-js"
-
-export const PurchaseUtils = {
- sortById: (state: TabSortState) =>
- (a: CodexPurchase, b: CodexPurchase) => {
-
- return state === "desc"
- ? b.requestId
- .toLocaleLowerCase()
- .localeCompare(a.requestId.toLocaleLowerCase())
- : a.requestId
- .toLocaleLowerCase()
- .localeCompare(b.requestId.toLocaleLowerCase())
- },
-}
\ No newline at end of file
diff --git a/src/index.css b/src/index.css
index 791f9c6..a144b1c 100644
--- a/src/index.css
+++ b/src/index.css
@@ -142,6 +142,10 @@ ul {
padding: 0;
}
+dialog {
+ padding: 0;
+}
+
input,
button,
textarea,
diff --git a/src/routes/dashboard/availabilities.css b/src/routes/dashboard/availabilities.css
index c32ee1f..73d526d 100644
--- a/src/routes/dashboard/availabilities.css
+++ b/src/routes/dashboard/availabilities.css
@@ -70,7 +70,7 @@
.button {
top: 0;
- bottom: 0;
+ bottom: 0px;
left: 0;
right: 0;
position: absolute;
diff --git a/src/routes/dashboard/purchases.css b/src/routes/dashboard/purchases.css
index df90d3a..afb1ae9 100644
--- a/src/routes/dashboard/purchases.css
+++ b/src/routes/dashboard/purchases.css
@@ -1,12 +1,16 @@
-.purchases-modal {
- margin: auto;
-}
+.purchases {
+ > div:first-child {
+ padding: 1rem 0;
+ display: flex;
+ align-items: center;
+ justify-content: flex-end;
+ }
-.purchases-actions {
- padding: 1rem;
- display: flex;
- align-items: center;
- justify-content: flex-end;
+ .table {
+ table thead tr th {
+ background-color: #14141499;
+ }
+ }
}
.purchases-loader {
diff --git a/src/routes/dashboard/purchases.tsx b/src/routes/dashboard/purchases.tsx
index 08d6056..dbf0039 100644
--- a/src/routes/dashboard/purchases.tsx
+++ b/src/routes/dashboard/purchases.tsx
@@ -1,100 +1,20 @@
-import { useQuery } from "@tanstack/react-query";
import { createFileRoute } from "@tanstack/react-router";
-import { CodexSdk } from "../../sdk/codex";
-import {
- Cell,
- Row,
- Spinner,
- Table,
-} from "@codex-storage/marketplace-ui-components";
import { StorageRequestCreate } from "../../components/StorageRequestSetup/StorageRequestCreate";
import "./purchases.css";
-import { FileCell } from "../../components/FileCellRender/FileCell";
-import { CustomStateCellRender } from "../../components/CustomStateCellRender/CustomStateCellRender";
-import { Promises } from "../../utils/promises";
-import { TruncateCell } from "../../components/TruncateCell/TruncateCell";
-import { Times } from "../../utils/times";
import { ErrorPlaceholder } from "../../components/ErrorPlaceholder/ErrorPlaceholder";
import { ErrorBoundary } from "@sentry/react";
-import { useData } from "../../hooks/useData";
+import { PurchasesTable } from "../../components/Purchase/PurchasesTable";
const Purchases = () => {
- const content = useData();
- const { data, isPending } = useQuery({
- queryFn: () =>
- CodexSdk.marketplace()
- .purchases()
- .then((s) => Promises.rejectOnError(s)),
- queryKey: ["purchases"],
-
- // No need to retry because if the connection to the node
- // is back again, all the queries will be invalidated.
- retry: false,
-
- // The client node should be local, so display the cache value while
- // making a background request looks good.
- staleTime: 0,
-
- // Refreshing when focus returns can be useful if a user comes back
- // to the UI after performing an operation in the terminal.
- refetchOnWindowFocus: true,
-
- initialData: [],
-
- // Throw the error to the error boundary
- throwOnError: true,
- });
-
- if (isPending) {
- return (
-