chore: resolved some todos#219
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
|
General Feedback
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/ This structure should also apply to all the pages, like Portfolio, DeFi, and Leaderboard pages (except for parts requiring dynamic rendering).
Move it from src/components to src/features/defi, similar to other features.
features/[feature_name]/types
|
| // TODO: components are already separated - SOLVED |
There was a problem hiding this comment.
I do not see any changes. Am I missing something?
There was a problem hiding this comment.
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.
| {/* 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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
This is an unintentional change, I guess.
Anyway, revert all the changes in this file.
|
I wanted us to use the infoTooltip component wherever there is an (i) icon I didn't know we had two different tooltip designs |
did the changes, pls review once |
…or/cleanup