-
Notifications
You must be signed in to change notification settings - Fork 7
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
CP-9925: Interactive Chart in Track Token Detail #2330
Conversation
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.
To deprecate the useApp() hook, I extracted two currency format functions and turned them into a separate hook.
+ [circleX, isActive, pathEnd, pathRange.x, width] | ||
) | ||
|
||
const setIsActive = useCallback( |
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.
In the previous graph, tracking the y-value of the finger’s position on the graph wasn’t necessary. However, in the graph within the new design, it is needed, so I modified the patch accordingly.
packages/core-mobile/app/new/routes/(signedIn)/(modals)/trackTokenDetail/index.tsx
Show resolved
Hide resolved
</Text> | ||
<Text variant="heading2"> | ||
{formatTokenInCurrency(selectedData?.value ?? 0)} | ||
</Text> |
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.
we can try the AnimatedText
here later after resolving some performance issues. It was very laggy when I used it.
<Text | ||
variant="subtitle2" | ||
sx={{ | ||
color: percentChange < 0 ? '$textDanger' : '$textSuccess' |
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 we show neutral color for 0?
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.
fixed.
</View> | ||
<View sx={{ opacity: priceChange ? 1 : 0 }}> | ||
<PriceChangeIndicator | ||
formattedPrice={priceChange?.formattedPrice ?? '$0.00'} |
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 we keep the idea of using UNKNOWN_AMOUNT
when there is no price?
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.
fixed.
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.
:love
Description
Ticket: CP-9925
Screenshots/Videos
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2025-02-28.at.09.35.34.mp4