-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/coin-page #15
Feat/coin-page #15
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
src/app/coin/[id]/page.tsx
Outdated
import BlockchainLinks from "../../../app/components/BlockChainLinks"; | ||
import { PlusIcon } from "../../icons/PlusIcon"; | ||
|
||
export default function CoinPage({ params }: { params: { id: string } }) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's define type or interface above this and use that type or interface here. Instead of writing { params: { id: string } }
directly.
import { Snippet } from "@nextui-org/react"; | ||
|
||
const BlockchainLinks = ({ link }: { link: string }) => { | ||
if (!link) return null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check should come outside of BlockchainLinks, if there is no link present then you should not render BlockchainLinks. Instead of loading it and then returning null from it.
src/app/components/HomePageLinks.tsx
Outdated
import { Snippet } from "@nextui-org/react"; | ||
|
||
const HomepageLinks = ({ link }: { link: string }) => { | ||
if (!link) return null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If link is not present then don't render HomepageLinks at all.
@@ -0,0 +1,308 @@ | |||
"use client"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This page has lot of logic. I would recommend not writing all JSX in once, instead move JSX to different different components and then load all of them here one below each other.
…nMetrics inside coinid page
added page for specific coin information based on selected coin in coins table.