-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implements onboarding routes, updates content
- Loading branch information
1 parent
7e7f987
commit 2cd3aed
Showing
4 changed files
with
87 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { ROUTES } from "../../router" | ||
|
||
const BASE_PATH = ROUTES.ONBOARDING_DISCOVER_ASSETS | ||
|
||
export const REMAP: Record<string, string> = { | ||
contract: 'contractAddresses', | ||
contractAddress: 'contractAddresses', | ||
} | ||
|
||
const ASSETS = [ | ||
"https://imagedelivery.net/X6w5bi3ztwg4T4f6LG8s0Q/assets/img/alias/dogami-thumbnail/raw", | ||
"https://imagedelivery.net/X6w5bi3ztwg4T4f6LG8s0Q/9dc016fe-e253-4018-f993-b64c04652200/raw", | ||
"https://imagedelivery.net/X6w5bi3ztwg4T4f6LG8s0Q/assets/img/alias/mclaren-thumbnail2/raw", | ||
"https://imagedelivery.net/X6w5bi3ztwg4T4f6LG8s0Q/assets/img/alias/mufc/raw", | ||
"https://imagedelivery.net/X6w5bi3ztwg4T4f6LG8s0Q/assets/img/alias/ziggurats/raw", | ||
"https://imagedelivery.net/X6w5bi3ztwg4T4f6LG8s0Q/d59ccc19-894a-4f11-4119-94161e1ed200/raw" | ||
] | ||
|
||
export async function handleAssets(request: Request): Promise<Response> { | ||
const { pathname } = new URL(request.url) | ||
const assetIndex = pathname.substring(BASE_PATH.length - 1) | ||
|
||
const index = Number(assetIndex) | ||
|
||
if (!Number.isFinite(index)) { | ||
return new Response('Malformed URL', { status: 500 }) | ||
} | ||
|
||
if (index < 0 || index > 5) { | ||
return new Response('Index out of bounds', { status: 500 }) | ||
} | ||
|
||
return Response.redirect(ASSETS[index], 301) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters