Skip to content

Conversation

chrstph-dvx
Copy link
Contributor

@chrstph-dvx chrstph-dvx commented Aug 18, 2025

Depends on #2595. This PR is part of a stack created with Aviator.

Summary

Steps to test

Copy link

vercel bot commented Aug 18, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
arbitrum-token-bridge Ready Ready Preview Aug 27, 2025 10:34am

return `/?${params.toString()}`
}

async function sanitizeAndRedirect(searchParams: {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This replaces our old getServerSideProps (not supported in app router)

Comment on lines +253 to 265
if (!fromChainId) {
return NextResponse.json(
{ message: 'fromChainId is required', data: null },
{ status: 400 }
)
}

if (!toChainId) {
return NextResponse.json(
{ message: 'toChainId is required', data: null },
{ status: 400 }
)
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those two checks were added because of Typescript (but it does make sense to have them)

- Example - to set the value of `?amount=` in browser, simply use
`const [, setQueryParams] = useArbQueryParams()`
`setQueryParams(newAmount)`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file was split, otherwise importing it on server-side would fail (use-query-params doesn't support server side import)

see pbeshai/use-query-params#273

import { getArbitrumNetwork } from '@arbitrum/sdk'
import { sanitizeNullSelectedToken } from '../util/queryParamUtils'

export { sanitizeNullSelectedToken } from '../util/queryParamUtils'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This export is to minimize the diff, we can change it in a later PR

Copy link

vercel bot commented Aug 21, 2025

Deployment failed with the following error:

The `vercel.json` schema validation failed with the following message: `routes[1]` should NOT have additional property `$schema`

Learn More: https://vercel.com/docs/concepts/projects/project-configuration

Copy link

vercel bot commented Aug 21, 2025

Deployment failed with the following error:

The `vercel.json` schema validation failed with the following message: `routes[1]` should NOT have additional property `outputDirectory`

Learn More: https://vercel.com/docs/concepts/projects/project-configuration

@chrstph-dvx chrstph-dvx changed the title chore: Migrate bridge to app router feat: Migrate bridge to app router Aug 25, 2025
@chrstph-dvx chrstph-dvx merged commit 3591321 into portal/01-setup Aug 27, 2025
5 checks passed
@chrstph-dvx chrstph-dvx deleted the portal/02-app branch August 27, 2025 11:06
chrstph-dvx added a commit that referenced this pull request Aug 27, 2025
chrstph-dvx added a commit that referenced this pull request Aug 28, 2025
chrstph-dvx added a commit that referenced this pull request Aug 29, 2025
chrstph-dvx added a commit that referenced this pull request Sep 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants