Skip to content

Commit

Permalink
api root fix for chains pages
Browse files Browse the repository at this point in the history
  • Loading branch information
manishiwa committed Aug 22, 2024
1 parent 57c96c7 commit 4e5a52e
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions app/(layout)/chains/[chain]/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

import { Metadata } from "next";
import { MasterURL } from "@/lib/urls";
import { ChainInfo, MasterResponse } from "@/types/api/MasterResponse";
Expand All @@ -20,13 +21,13 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
}, {} as { [key: string]: ChainInfo & { key: string } });


if (!params.chain || !Object.keys(AllChainsByUrlKey).includes(params.chain)) {
track("404 Error", {
location: "404 Error",
page: "/chains/" + params.chain,
});
return notFound();
}
// if (!params.chain || !Object.keys(AllChainsByUrlKey).includes(params.chain)) {
// track("404 Error", {
// location: "404 Error",
// page: "/chains/" + params.chain,
// });
// return notFound();
// }

const key = AllChainsByUrlKey[params.chain].key;
const urlKey = AllChainsByUrlKey[params.chain].url_key;
Expand Down

0 comments on commit 4e5a52e

Please sign in to comment.