-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: redesing result page and notFound page
- Loading branch information
Showing
32 changed files
with
276 additions
and
92 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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 was deleted.
Oops, something went wrong.
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,3 @@ | ||
export interface PropsType { | ||
query: string; | ||
} |
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,28 @@ | ||
import NotFoundImage from 'public/img/notFound.svg'; | ||
import Image from 'next/image'; | ||
import { PropsType } from './NotFound.type'; | ||
import Link from 'next/link'; | ||
|
||
function NotFound(props: PropsType) { | ||
const { query } = props; | ||
return ( | ||
<div className="w-full py-[120px] flex flex-col items-center"> | ||
<Image src={NotFoundImage} height={318} alt="Not Found" /> | ||
<div className="text-45 pt-[100px] text-primary-500 font-semibold"> | ||
Oops! We couldn't find what you are looking for | ||
</div> | ||
<div className="text-20 text-neutral-800 pt-10"> | ||
{`The search string you entered was: ${query || ''}`} | ||
</div> | ||
<div className="text-20 text-neutral-800"> | ||
This is an invalid search string. | ||
</div> | ||
<Link | ||
href="/" | ||
className="text-baseForeground bg-primary-600 py-15 px-20 mt-50 text-center rounded-full w-[224px] text-18 font-medium"> | ||
Back To Home | ||
</Link> | ||
</div> | ||
); | ||
} | ||
export default NotFound; |
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,5 @@ | ||
import { SwapType } from 'types'; | ||
|
||
export interface PropsType { | ||
data: SwapType[]; | ||
} |
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,25 @@ | ||
import Table from 'components/common/Table'; | ||
import { PropsType } from './Result.type'; | ||
|
||
function Result(props: PropsType) { | ||
const { data } = props; | ||
return ( | ||
<div className="container mt-[3.125rem] rounded-normal bg-baseForeground p-35"> | ||
<div className="flex flex-col"> | ||
<div className="flex flex-col justify-center"> | ||
<h2 className="text-28 font-semibold text-primary-500"> | ||
Search Results | ||
</h2> | ||
<p className="text-16 text-neutral-800"> | ||
{`Found ${data.length} Rango swaps for this wallet address`} | ||
</p> | ||
</div> | ||
<div className="mt-25"> | ||
<Table data={data} /> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
export default Result; |
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 |
---|---|---|
@@ -1,14 +1,14 @@ | ||
export const MATCH_TYPE = { | ||
ADDRESS: 'ADDRESS', | ||
REQUESTID: 'REQUESTID' | ||
} | ||
REQUESTID: 'REQUESTID', | ||
}; | ||
|
||
export const STATUS: any = { | ||
success: 'success', | ||
failed: 'failed', | ||
running: 'running', | ||
unknown: 'Pending', | ||
null: 'Pending' | ||
} | ||
null: 'Pending', | ||
}; | ||
|
||
export const API_URL = process.env.NEXT_PUBLIC_BASE_URL | ||
export const API_URL = process.env.NEXT_PUBLIC_BASE_URL; |
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 |
---|---|---|
@@ -1,32 +1,38 @@ | ||
import NotFoundAnything from 'components/notFound/NotFoundAnything'; | ||
import type { NextPage } from 'next'; | ||
import { useRouter } from 'next/router'; | ||
import copy from 'public/img/copy.svg'; | ||
import { CopyText } from 'utils/copyText'; | ||
import Navbar from 'components/common/Navbar'; | ||
import Image from 'next/image'; | ||
import Layout from 'components/common/Layout'; | ||
import Link from 'next/link'; | ||
import notFound404 from 'public/img/404.svg'; | ||
import notFoundImage from 'public/img/notFound.png'; | ||
|
||
const NotFound: NextPage = () => { | ||
const router = useRouter(); | ||
const { query }: { query?: string } = router.query; | ||
function NotFoundPage() { | ||
return ( | ||
<Layout title="404-Not Found"> | ||
{query != null && ( | ||
<div className="flex items-center text-base font-bold mb-3 lg:mb-6 lg:text-28"> | ||
search results: <span className="font-normal ml-1">{query}</span> | ||
<button | ||
onClick={(e) => { | ||
e.stopPropagation(); | ||
CopyText(query); | ||
}} | ||
className="group relative cursor-pointer"> | ||
<Image src={copy} alt="copy_to_clipboard" /> | ||
</button> | ||
<div className="h-full w-full bg-body-mask bg-cover"> | ||
<Navbar theme="dark" /> | ||
<main className="w-full flex justify-center"> | ||
<div className="container flex flex-col mt-[100px] items-center"> | ||
<div className="w-full relative"> | ||
<div className="w-full pt-1/4 opacity-75"> | ||
<Image src={notFound404} className="mx-auto w-1/2" alt="404" /> | ||
</div> | ||
<div className="w-full flex justify-center absolute top-1/4"> | ||
<Image className="w-1/4" src={notFoundImage} alt="Not Found!" /> | ||
</div> | ||
</div> | ||
<div className="text-45 pt-[100px] text-primary-500 font-semibold"> | ||
Page Not Found{' '} | ||
</div> | ||
<div className="text-20 text-neutral-800"> | ||
There is no page with this URL! | ||
</div> | ||
<Link | ||
href="/" | ||
className="text-baseForeground bg-primary-600 py-15 px-20 mt-50 text-center rounded-full w-[224px] text-18 font-medium"> | ||
Back To Home | ||
</Link> | ||
</div> | ||
)} | ||
<NotFoundAnything /> | ||
</Layout> | ||
</main> | ||
</div> | ||
); | ||
}; | ||
} | ||
|
||
export default NotFound; | ||
export default NotFoundPage; |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.