mirror of
https://github.com/logos-storage/logos-storage-marketplace-ui.git
synced 2026-01-02 13:33:06 +00:00
Add a specific message when the marketplace is not enabled
This commit is contained in:
parent
c8411eb96a
commit
c5fd035b8d
2945
package-lock.json
generated
2945
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -24,7 +24,7 @@
|
||||
],
|
||||
"dependencies": {
|
||||
"@codex-storage/marketplace-ui-components": "0.0.14",
|
||||
"@codex-storage/sdk-js": "0.0.6",
|
||||
"@codex-storage/sdk-js": "0.0.7",
|
||||
"@sentry/browser": "^8.32.0",
|
||||
"@sentry/react": "^8.31.0",
|
||||
"@tanstack/react-query": "^5.51.15",
|
||||
|
||||
@ -8,6 +8,7 @@ import { CodexSdk } from "../../sdk/codex";
|
||||
import "./availabilities.css";
|
||||
import { AvailabilitiesTable } from "../../components/Availability/AvailabilitiesTable";
|
||||
import { AvailabilityCreate } from "../../components/Availability/AvailabilityCreate";
|
||||
import { CodexError } from "@codex-storage/sdk-js";
|
||||
|
||||
const defaultSpace = {
|
||||
quotaMaxBytes: 0,
|
||||
@ -105,9 +106,24 @@ export function Availabilities() {
|
||||
export const Route = createFileRoute("/dashboard/availabilities")({
|
||||
component: () => (
|
||||
<ErrorBoundary
|
||||
fallback={({ error }) => (
|
||||
<ErrorPlaceholder error={error} subtitle="Cannot retrieve the data." />
|
||||
)}>
|
||||
fallback={({ error }) => {
|
||||
console.info("error", error);
|
||||
if (error instanceof CodexError && error.code === 503) {
|
||||
return (
|
||||
<ErrorPlaceholder
|
||||
error={error}
|
||||
subtitle="The marketplace is not enabled in your Node. Please restart you node with persistence argument, check the documentation for more details."
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<ErrorPlaceholder
|
||||
error={error}
|
||||
subtitle="Cannot retrieve the data."
|
||||
/>
|
||||
);
|
||||
}}>
|
||||
<Availabilities />
|
||||
</ErrorBoundary>
|
||||
),
|
||||
|
||||
@ -11,6 +11,7 @@ import { TruncateCell } from "../../components/TruncateCell/TruncateCell";
|
||||
import { Times } from "../../utils/times";
|
||||
import { ErrorPlaceholder } from "../../components/ErrorPlaceholder/ErrorPlaceholder";
|
||||
import { ErrorBoundary } from "@sentry/react";
|
||||
import { CodexError } from "@codex-storage/sdk-js";
|
||||
|
||||
const Purchases = () => {
|
||||
const { data, isPending, error } = useQuery({
|
||||
@ -85,9 +86,24 @@ const Purchases = () => {
|
||||
export const Route = createFileRoute("/dashboard/purchases")({
|
||||
component: () => (
|
||||
<ErrorBoundary
|
||||
fallback={({ error }) => (
|
||||
<ErrorPlaceholder error={error} subtitle="Cannot retrieve the data." />
|
||||
)}>
|
||||
fallback={({ error }) => {
|
||||
console.info("error", error);
|
||||
if (error instanceof CodexError && error.code === 503) {
|
||||
return (
|
||||
<ErrorPlaceholder
|
||||
error={error}
|
||||
subtitle="The marketplace is not enabled in your Node. Please restart you node with persistence argument, check the documentation for more details."
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<ErrorPlaceholder
|
||||
error={error}
|
||||
subtitle="Cannot retrieve the data."
|
||||
/>
|
||||
);
|
||||
}}>
|
||||
<Purchases />
|
||||
</ErrorBoundary>
|
||||
),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user