-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement sticky on ticker page
- Loading branch information
1 parent
4308811
commit 728a144
Showing
8 changed files
with
57 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
"use client"; | ||
import Image from "next/image"; | ||
import { Button } from "@/components/common/button/button"; | ||
import { useRouter } from "next/navigation"; | ||
import ErrorImage from "@/app/(main)/_assets/error.png"; | ||
|
||
export default function Error({ error, reset }: { error: Error & { digest?: string }; reset: () => void }) { | ||
const router = useRouter(); | ||
|
||
const handleButtonClick = () => { | ||
router.replace("/"); | ||
}; | ||
|
||
return ( | ||
<div className="flex size-full flex-col items-center justify-center gap-6"> | ||
<Image src={ErrorImage} alt="Error Occurred" width={160} height={160} /> | ||
<div className="flex flex-col items-center"> | ||
<h2 className=" text-h5 text-grey-900">Something went wrong!</h2> | ||
<h2 className=" text-h5 text-grey-900">Please Try Again</h2> | ||
</div> | ||
<Button className="rounded-lg" variant={"primary"} size={"fit"} onClick={handleButtonClick}> | ||
Go To Home | ||
</Button> | ||
</div> | ||
); | ||
} |
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,23 @@ | ||
import { Viewport } from "next"; | ||
import Link from "next/link"; | ||
import React from "react"; | ||
import Logo from "@/components/common/logo/logo"; | ||
|
||
export const viewport: Viewport = { | ||
themeColor: "var(--color-white)", | ||
}; | ||
|
||
const InputLayout = ({ children }: { children: React.ReactNode }) => { | ||
return ( | ||
<div className="flex size-full flex-col"> | ||
<div className="sticky top-0 z-10 flex h-11 w-full shrink-0 items-center justify-start bg-white px-5"> | ||
<Link href="/"> | ||
<Logo /> | ||
</Link> | ||
</div> | ||
<div className="h-[calc(100%-50px)] w-full">{children}</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default InputLayout; |
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
4 changes: 2 additions & 2 deletions
4
...in)/ticker/_components/ticker-content.tsx → ...ut)/ticker/_components/ticker-content.tsx
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.
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.