-
Notifications
You must be signed in to change notification settings - Fork 2
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 liquidity tabs2 #223
Conversation
!isStandardOrUnderlyingRootToken(pool, token2) | ||
) { | ||
return false | ||
} |
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.
const token1IsStandard = isStandardOrUnderlyingRootToken(pool, token1)
const token2IsStandard = isStandardOrUnderlyingRootToken(pool, token2)
if (token1IsStandard === token2IsStandard) {
return false
}
packages/lib/shared/components/btns/button-group/ButtonGroup.tsx
Outdated
Show resolved
Hide resolved
<Box flex="1" key={`button-group-option-${option.value}`}> | ||
<GroupOptionButton | ||
isActive={isActive} | ||
key={`button-group-option-${option.value}`} |
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.
key is probably not needed here
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.
If we had multiple options with no tabTooltipLabel
, we would need that key do differentiate the different Box components, wouldn't we?
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.
the key is already on the parent Box
, so not needed on the child GroupOptionButton
bg="transparent" | ||
id={`button-group-${option.value}`} | ||
isDisabled={option.disabled} | ||
key={`button-group-option-${option.value}`} |
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.
i think this key is also probably not needed
|
||
function IconPopover({ option }: { option: ButtonGroupOption }) { | ||
if (option.tabTooltipLabel) return null | ||
if (!option.iconTooltipLabel) return null |
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.
if (option.tabTooltipLabel || !option.iconTooltipLabel) return null
packages/lib/shared/components/btns/button-group/ButtonGroup.tsx
Outdated
Show resolved
Hide resolved
packages/lib/shared/components/btns/button-group/ButtonGroup.tsx
Outdated
Show resolved
Hide resolved
let errorMessage = 'Unexpected error. Please ask for support' | ||
let proportionalLabel = 'Please use proportional mode.' | ||
|
||
if (!error) return |
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.
move this to the top of the function
import { BalAlertLink } from '../alerts/BalAlertLink' | ||
import { ErrorAlert } from './ErrorAlert' | ||
import { useAddLiquidity } from '@repo/lib/modules/pool/actions/add-liquidity/AddLiquidityProvider' | ||
|
||
type Props = AlertProps & { | ||
error?: Error | null |
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.
why is error
optional?
No description provided.