Skip to content

Commit

Permalink
chore: remove goerli and some CSS change
Browse files Browse the repository at this point in the history
  • Loading branch information
mohandast52 committed Aug 12, 2024
1 parent 43dae31 commit 3afe314
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ const getColumns = (onClick, isActive, acc, depositoryAddress, hideEmptyProducts
dataIndex: 'fullCurrentPriceLp',
key: 'fullCurrentPriceLp',
width: 140,
render: (currentPriceLp, details) => {
if (isCurrentPriceLpZero(currentPriceLp)) {
render: (text, details) => {
if (isCurrentPriceLpZero(text)) {
return <Loader />;
}

return (
<a href={details.currentPriceLpLink} rel="noopener noreferrer" target="_blank">
{currentPriceLp}
{text}
</a>
);
},
Expand Down Expand Up @@ -338,6 +338,7 @@ export const BondingList = ({ bondingProgramType, hideEmptyProducts }) => {
productDetails?.discount,
).toString()}
productSupply={productDetails?.supply}
productLpTokenName={productDetails?.lpTokenName}
getProducts={refetch}
closeModal={handleModalClose}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const fullWidth = { width: '100%' };
export const Deposit = ({
productId,
productToken,
productLpTokenName,
productLpPriceAfterDiscount,
productSupply,
getProducts,
Expand Down Expand Up @@ -238,12 +239,12 @@ export const Deposit = ({
{isApproveModalVisible && (
<Modal
title="Approve OLAS"
visible={isApproveModalVisible}
open={isApproveModalVisible}
footer={null}
onCancel={() => setIsApproveModalVisible(false)}
>
<Alert
message="Before depositing to the bonding product, an approval for OLAS is required. Please approve OLAS to proceed."
message={`Before depositing to the bonding product, an approval for ${productLpTokenName} is required. Please approve ${productLpTokenName} to proceed.`}
type="warning"
/>

Expand Down Expand Up @@ -291,6 +292,7 @@ export const Deposit = ({
Deposit.propTypes = {
productId: PropTypes.string,
productToken: PropTypes.string,
productLpTokenName: PropTypes.string,
productSupply: PropTypes.oneOfType([
PropTypes.instanceOf(PropTypes.string),
PropTypes.instanceOf(BigInt),
Expand All @@ -306,6 +308,7 @@ Deposit.propTypes = {
Deposit.defaultProps = {
productId: undefined,
productToken: null,
productLpTokenName: null,
productLpPriceAfterDiscount: null,
productSupply: null,
closeModal: () => {},
Expand Down
17 changes: 12 additions & 5 deletions apps/bond/components/BondingProducts/BondingProducts.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,28 @@ const { Title } = Typography;
const PageHeader = styled.div`
align-items: center;
margin-bottom: 12px;
display: ${(props) => (props.isMobile ? 'block' : 'flex')};
display: ${(props) => (props.is_mobile === 'true' ? 'block' : 'flex')};
`;

const StyledDivider = styled(Divider)`
margin: ${(props) => (props.isMobile ? '12px 0 ' : '0 12px')};
margin: ${(props) => (props.is_mobile === 'true' ? '12px 0 ' : '0 12px')};
`;

const SwitchContainer = styled.div`
align-items: center;
display: flex;
`;

const manageSolanaLiquidityBtnCss = {
width: '160px',
whiteSpace: 'normal',
height: 'auto',
};

const ResponsiveDivider = () => {
const { isMobile } = useScreen();

return <StyledDivider isMobile={isMobile} type={isMobile ? 'horizontal' : 'vertical'} />;
return <StyledDivider is_mobile={`${isMobile}`} type={isMobile ? 'horizontal' : 'vertical'} />;
};

export const BondingProducts = () => {
Expand All @@ -50,9 +56,9 @@ export const BondingProducts = () => {

return (
<>
<PageHeader isMobile={isMobile}>
<PageHeader is_mobile={`${isMobile}`}>
<Flex justify="space-between" align="center" style={{ width: '100%' }}>
<Flex align="center">
<Flex align="center" vertical={isMobile}>
<Title level={4} className="mb-0 mt-0">
Bonding Products
</Title>
Expand Down Expand Up @@ -80,6 +86,7 @@ export const BondingProducts = () => {
type="primary"
ghost
onClick={() => router.push('manage-solana-liquidity')}
style={isMobile ? manageSolanaLiquidityBtnCss : undefined}
>
Manage Solana Liquidity
</Button>
Expand Down

0 comments on commit 3afe314

Please sign in to comment.