Skip to content

Commit

Permalink
move pages
Browse files Browse the repository at this point in the history
  • Loading branch information
nialexsan committed Sep 26, 2024
1 parent 7ec7a8e commit c245ce2
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion components/FundAccountFields.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export default function FundAccountFields({
<Themed.p sx={{textAlign: "center"}}>
Don&apos;t have an account?{" "}
<Link
href={paths.root}
href={paths.createAccount}
variant="underline"
data-test="fund-account-create-link"
>
Expand Down
2 changes: 1 addition & 1 deletion components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default function Header({fund}: {fund?: boolean}) {
{fund ? "Already have an account?" : "Don't have an account?"}
</Text>
<Button
href={fund ? paths.fundAccount : paths.root}
href={fund ? paths.fundAccount : paths.createAccount}
data-test={`header-${fund ? "fund" : "create"}-link`}
variant="secondary"
>
Expand Down
1 change: 1 addition & 0 deletions lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export const INVALID_NETWORK_ADDRESS_ERROR = (network: Networks) =>
export const paths = {
root: "/",
fundAccount: "/fund-account",
createAccount: "/create-account",
}

export const ADDRESS_REGEXP = /^(0x)?([0-9a-fA-F]{16}|[0-9a-fA-F]{40})$/
Expand Down
4 changes: 2 additions & 2 deletions pages/index.tsx → pages/create-account.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Header from "components/Header"
import PageTitle from "components/PageTitle"
import {CreateAccountURLParams} from "lib/client"

export default function Home(props: CreateAccountURLParams) {
export default function CreateAccount(props: CreateAccountURLParams) {
return (
<AppContainer>
<PageTitle>Create Account</PageTitle>
Expand All @@ -14,7 +14,7 @@ export default function Home(props: CreateAccountURLParams) {
)
}

Home.getInitialProps = async (context: any) => {
CreateAccount.getInitialProps = async (context: any) => {
const key: string = context.query.key || ""
const source: string = context.query.source || ""
const sigAlgo: string = context.query["sig-algo"] || "ECDSA_P256"
Expand Down
9 changes: 8 additions & 1 deletion vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,12 @@
"pages/api/**/*.ts": {
"maxDuration": 60
}
}
},
"redirects": [
{
"source": "/",
"destination": "/fund-account",
"permanent": true
}
]
}

0 comments on commit c245ce2

Please sign in to comment.