-
Notifications
You must be signed in to change notification settings - Fork 45
refactor: user positions table llamalend #1600
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
base: main
Are you sure you want to change the base?
Conversation
… chips and visibilty settings
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| import { ArrowTopRightIcon } from '@ui-kit/shared/icons/ArrowTopRightIcon' | ||
|
|
||
| // TODO: move it to constants / links file | ||
| const LLAMA_MONITOR_BOT_URL = 'https://t.me/LlamalendMonitorBot' |
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.
Is there a better place for this external link?
| export const UserPositionsTable = ({ result, loading, tab }: UserPositionsTableProps) => { | ||
| export const UserPositionsTable = ({ onReload, result, loading, tab }: UserPositionsTableProps) => { | ||
| const { markets: data = [], userHasPositions } = result ?? {} | ||
| const userData = useMemo(() => data.filter((market) => market.userHasPositions?.[tab]), [data, tab]) |
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.
imo better to filter early by user positions instead of giving the table all the markets
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.
Maybe should be moved to llama-markets.ts?
| } | ||
|
|
||
| // Enum for the empty state of the user positions table | ||
| export enum PositionsEmptyState { |
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.
Should I create a different constants.ts or rename this one?
Refactor the User Positions Table for llamalend