-
Notifications
You must be signed in to change notification settings - Fork 21
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
Buy sell panel slider #568
base: main
Are you sure you want to change the base?
Conversation
Deploying dexter with Cloudflare Pages
|
…sell-panel-slider
src/app/styles/globals.css
Outdated
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 it possible to make those classes inline tailwind CSS classes instead of using global classes?
If you run into the issue that they are not applied or overwritten, you can always try adding !
before the class, so it becomes !important
.
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.
@saidam90 did you try this?
isBuyOrder: boolean; | ||
isSellOrder: boolean; |
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 this be
isMarketBuyOrder
isMarketSellOrder
?
Or are we using those booleans also for LIMIT orders?
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.
@saidam90 can you comment on this?
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.
Looks great! Using the calculator seems to have removed the issues with rounding I ran into.
Also the reported bugs seem fixed for me too.
Some minor changes. I'd say let's test this on stokenet with 3-4 testers. I will organize a community test.
} else if (isLimitOrder) { | ||
sliderCallback(0, "LIMIT"); | ||
} | ||
}, [isBuyOrder, isSellOrder, isMarketOrder, isLimitOrder]); |
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.
React Hook useEffect has a missing dependency: 'sliderCallback'. Either include it or remove the dependency array
}, [isBuyOrder, isSellOrder, isMarketOrder, isLimitOrder]); | ||
|
||
const sliderCallback = (newPercentage: number, type: string) => { | ||
console.log(`Type is: ${type}`); |
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.
remove console log.
@@ -479,7 +541,15 @@ function UserInputContainer() { | |||
<> | |||
<CurrencyInputGroup userAction={UserAction.UPDATE_PRICE} /> | |||
<CurrencyInputGroup userAction={UserAction.SET_TOKEN_1} /> | |||
<PercentageSlider /> |
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.
|
||
return ( | ||
<> | ||
<div className="slider-container rounded-md w-full relative mt-5"> |
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.
can you make the full slider opacity of 0.7, currently there is too much emphasis on it.
<div className="slider-container rounded-md w-full relative mt-5"> | |
<div className="slider-container rounded-md w-full relative mt-5 opacity-70"> |
Implemented Buy/Sell panel percentage slider.