Skip to content

chore: resolved some todos#219

Open
hemantwasthere wants to merge 9 commits into
refactor/cleanupfrom
feat/resolve-todo-comments
Open

chore: resolved some todos#219
hemantwasthere wants to merge 9 commits into
refactor/cleanupfrom
feat/resolve-todo-comments

Conversation

@hemantwasthere

Copy link
Copy Markdown
Contributor

…or/cleanup

@vercel

vercel Bot commented Oct 30, 2025

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
endur-client Ignored Ignored Nov 6, 2025 4:07pm
endur-client-mainnet-prerelease Ignored Ignored Nov 6, 2025 4:07pm
endur-client-testnet Ignored Ignored Nov 6, 2025 4:07pm

Comment thread src/app/api/block-holdings/[address]/[block]/route.ts
Comment thread src/app/api/lst/stats/route.ts
Comment thread src/store/lst.store.ts Outdated
Comment thread src/store/lst.store.ts Outdated
@NeelkanthTandel

NeelkanthTandel commented Nov 5, 2025

Copy link
Copy Markdown
Collaborator

General Feedback

  1. Each feature should have its own index.tsx, which serves as the main entry point after app/[feature_name]/page.tsx.

Any dynamic rendering for tokens like BTC and STRK should be handled in the index.tsx whenever possible.

The index.tsx file should only render child components specific to BTC and STRK.

All other components should be placed inside features/[feature_name]/components.

Example – Staking Feature (Main Landing Page):

features/staking/
├── index.tsx // Entry point
└── components/
├── TokenTabContent.tsx // Dynamic tab content (rename from TokenTab if clearer)
├── Stake.tsx
├── Unstake.tsx
├── WithdrawLogs.tsx

This structure should also apply to all the pages, like Portfolio, DeFi, and Leaderboard pages (except for parts requiring dynamic rendering).

  1. The DeFi page should also follow the feature-based structure.

Move it from src/components to src/features/defi, similar to other features.

  1. If feature-specific types are extracted into a separate file, place them in one of the following locations: (Your call, but the same thing should be maintained for every future change)

features/[feature_name]/types
src/types/[feature].types.ts

  1. No need to keep the previous things commented, you can replace that
(this is not about comments - keep comments, and add solved at the end as you are doing now).
    Not sure if this is happening everywhere, but I saw it at a couple of places, especially in info tooltip changes.

// TODO: components are already separated - SOLVED

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not see any changes. Am I missing something?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I meant:
If a function is only used within a component, define it locally instead of passing it as a prop.

For example, handleEmail defined in checkEligibility should be moved inside eligibilityModal, since it handles the modal’s input.
Keeping such logic self-contained improves component clarity and reduces unnecessary prop dependencies.

Comment thread Changes.md
Comment thread src/app/api/lst/stats/route.ts
Comment thread src/features/leaderboard/types.ts
Comment thread src/components/defi.tsx Outdated
{/* TODO: separate the component and use the same component for strk and btc (can name it as <TokenTab>) */}
{/* TODO: separate the component and use the same component for strk and btc (can name it as <TokenTab>) - SOLVED: Current structure is already well-organized with clear separation */}
{/* STRK Tab Content */}
<TabsContent

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strk tabContent and btc, both are the same and have the same content.
Move this to TabContent (not the current one, this one will be renamed to index.tsx, make a new file), and use this TabContent two times with prop [btc and strk] here in index.tsx

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment thread src/store/lst.store.ts

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an unintentional change, I guess.
Anyway, revert all the changes in this file.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment thread src/store/merry.store.ts Outdated
Comment thread src/constants/index.ts Outdated
Comment thread src/features/staking/components/token-tab.tsx Outdated
@NeelkanthTandel

Copy link
Copy Markdown
Collaborator

I wanted us to use the infoTooltip component wherever there is an (i) icon
Even the icon should be in this infoTooltip component, so that we just have to use this component where required. [This icon's class can be passed as props, and there can be a default class (styles) applied to this icon]

I didn't know we had two different tooltip designs
But still, we can achieve that by using dottedBorder props or any other approach to make the infotooltip generic with a conditional design
Can we do this? Let me know if it's still confusing

@hemantwasthere

Copy link
Copy Markdown
Contributor Author

I wanted us to use the infoTooltip component wherever there is an (i) icon Even the icon should be in this infoTooltip component, so that we just have to use this component where required. [This icon's class can be passed as props, and there can be a default class (styles) applied to this icon]

I didn't know we had two different tooltip designs But still, we can achieve that by using dottedBorder props or any other approach to make the infotooltip generic with a conditional design Can we do this? Let me know if it's still confusing

did the changes, pls review once

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.

2 participants