Skip to content

Commit

Permalink
feat: Updated packages/hub/src/app/models/[owner]/
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] authored Oct 27, 2023
1 parent 9f1c953 commit f50c275
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useQuery } from "@apollo/client";
import { NotFoundError } from "apollo-client/errors";
import { NotFoundError } from "@apollo/client";
import { ListView } from "@/relative-values/components/views/ListView";
import { GET_RELATIVE_VALUES_PAGE } from "@/relative-values/graphql/queries";

Expand All @@ -10,14 +10,14 @@ export default function ModelRelativeValuesPage({ owner, slug, variableName }) {

if (error) {
if (error instanceof NotFoundError) {
return <ErrorPage statusCode={404} message={`Page ${variableName} does not exist.`} />;
return <Error statusCode={404} title={`Page ${variableName} does not exist.`} />;
} else {
return <ErrorPage statusCode={500} message={`An error occurred: ${error.message}`} />;
return <Error statusCode={500} title={`An error occurred: ${error.message}`} />;
}
}

if (!data || !data.relativeValuesPage) {
return <ErrorPage statusCode={404} message={`Page ${variableName} does not exist.`} />;
return <Error statusCode={404} title={`Page ${variableName} does not exist.`} />;
} else {
return <ListView data={data.relativeValuesPage} />;
}
Expand Down

0 comments on commit f50c275

Please sign in to comment.