-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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: Add cancel order component to deprecated limit orders #10291
feat: Add cancel order component to deprecated limit orders #10291
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
6 Skipped Deployments
|
|
</Td> | ||
<Td> | ||
<Button | ||
onClick={async () => { |
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.
how about wrap a 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.
Done, I refactored the code too and make the return type of existing orders as an object instead of an array to make it more readable
const handleClick = useCallback((tabType: ORDER_CATEGORY) => setIndex(tabType), []) | ||
const tabMenuItems = useMemo(() => { | ||
if (activeTab === ORDER_CATEGORY.Existing) { | ||
return [t('Existing Orders')] | ||
} | ||
return [t('Open Orders'), t('Expired Order'), t('Order History')] |
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.
so there will still show the ('Open Orders'), t('Expired Order'), t('Order History') tabs? or just drop them
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.
when i click the tabMenu header, the activeTab will be 0, so then the tabMenuItems will render to the old three tabs, and i can't back to the 'Existing Orders' 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.
@chef-eric Fixed the issue, i keep the tabs texts for now to not get removed from translations.json, because if i remove it from here translation test will get failed therefore it needs to be removed to make it green
eefa229
to
5152f34
Compare
oh, some conflict |
c2a7118
to
1637b9c
Compare
63429ca
to
1a27342
Compare
1a27342
to
24b5d7e
Compare
24b5d7e
to
695ca0a
Compare
695ca0a
to
beebc91
Compare
beebc91
to
3c161c6
Compare
3c161c6
to
6c5dd32
Compare
6c5dd32
to
0c7ba00
Compare
PR-Codex overview
This PR introduces the handling of existing limit orders in the application, enhancing the user interface with a new component for displaying these orders. It also implements caching for transaction queries to improve performance.
Detailed summary
ORDER_CATEGORY.Existing
to handle existing orders.ExistingOrder
interface for existing limit order data structure.ExistingLimitOrderTable
component to display existing orders.handler
for transaction queries.LimitOrderTable
to include logic for rendering existing orders.