-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9bda803
commit 657b662
Showing
3 changed files
with
64 additions
and
3 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,41 @@ | ||
// pages/tradingPairs/index.tsx | ||
|
||
import React, { useEffect, useRef, useState } from "react"; | ||
import { useRouter } from "next/router"; | ||
import Layout from "../../components/layout"; | ||
import { | ||
VStack, | ||
Text, | ||
Spinner, | ||
Center, | ||
Box, | ||
HStack, | ||
Input, | ||
Button, | ||
} from "@chakra-ui/react"; | ||
import { useSearchParams } from "next/navigation"; | ||
|
||
export default function TradingPairs() { | ||
const searchParams = useSearchParams(); | ||
const token1 = searchParams.get("token1")?.toLocaleLowerCase(); | ||
const token2 = searchParams.get("token2")?.toLocaleLowerCase(); | ||
|
||
if (!token1 || !token2) { | ||
return ( | ||
<Layout pageTitle="Trading Pair View"> | ||
<Center height="100vh"> | ||
<Text>token1 or token2 url argument missing.</Text> | ||
</Center> | ||
</Layout> | ||
); | ||
} | ||
|
||
|
||
return ( | ||
<Layout pageTitle={`${token1}/${token2}`}> | ||
<Center height="100vh"> | ||
<Text>{`${token1} ${token2}`}</Text> | ||
</Center> | ||
</Layout> | ||
); | ||
} |