Skip to content

Commit

Permalink
fix: replaced middleware with app router
Browse files Browse the repository at this point in the history
  • Loading branch information
MartianGreed committed Sep 18, 2024
1 parent 6bb3841 commit 5be079a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 31 deletions.
12 changes: 12 additions & 0 deletions apps/arkmarket/src/app/[collectionAddress]/[tokenId]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { notFound } from "next/navigation";
import { ChainId, CollectionAddresses } from "~/config/homepage";
import TokenPage from "~/app/token/[contractAddress]/[tokenId]/page";

export default function TokenPageRoute({ params }) {
const collection = CollectionAddresses[params.collectionAddress];

Check failure on line 6 in apps/arkmarket/src/app/[collectionAddress]/[tokenId]/page.tsx

View workflow job for this annotation

GitHub Actions / lint

Unsafe assignment of an error typed value

Check failure on line 6 in apps/arkmarket/src/app/[collectionAddress]/[tokenId]/page.tsx

View workflow job for this annotation

GitHub Actions / lint

Computed name [params.collectionAddress] resolves to an `any` value

Check failure on line 6 in apps/arkmarket/src/app/[collectionAddress]/[tokenId]/page.tsx

View workflow job for this annotation

GitHub Actions / lint

Unsafe member access .collectionAddress on an `any` value
if (undefined === collection) {
return notFound()
}
const address = collection[ChainId.SN_MAIN];

Check failure on line 10 in apps/arkmarket/src/app/[collectionAddress]/[tokenId]/page.tsx

View workflow job for this annotation

GitHub Actions / lint

Unsafe assignment of an error typed value

Check failure on line 10 in apps/arkmarket/src/app/[collectionAddress]/[tokenId]/page.tsx

View workflow job for this annotation

GitHub Actions / lint

Unsafe member access [ChainId.SN_MAIN] on an `error` typed value
return TokenPage({ params: { contractAddress: address, tokenId: params.tokenId } })

Check failure on line 11 in apps/arkmarket/src/app/[collectionAddress]/[tokenId]/page.tsx

View workflow job for this annotation

GitHub Actions / lint

Unsafe assignment of an error typed value
}
31 changes: 0 additions & 31 deletions apps/arkmarket/src/middleware.ts

This file was deleted.

0 comments on commit 5be079a

Please sign in to comment.