Skip to content
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

Merged
merged 14 commits into from
May 14, 2024
Merged

Feat/coin-page #15

merged 14 commits into from
May 14, 2024

Conversation

bonz88
Copy link
Owner

@bonz88 bonz88 commented May 12, 2024

added page for specific coin information based on selected coin in coins table.

Copy link

vercel bot commented May 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
cryptofolio ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 13, 2024 2:04pm

import BlockchainLinks from "../../../app/components/BlockChainLinks";
import { PlusIcon } from "../../icons/PlusIcon";

export default function CoinPage({ params }: { params: { id: string } }) {
Copy link
Collaborator

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;
Copy link
Collaborator

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.

import { Snippet } from "@nextui-org/react";

const HomepageLinks = ({ link }: { link: string }) => {
if (!link) return null;
Copy link
Collaborator

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";
Copy link
Collaborator

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.

@bonz88 bonz88 merged commit dec21f1 into main May 14, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants