Skip to content
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

fix: alignment and inbound in swap #65

Merged
merged 3 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/pages/dashboard/Activity/SwapActivityDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function SwapActivityDetails({ isOpen, onClose, swapPair }:Props):JSX.Element {
</div>
</div>
<Uik.Text text="Transfer Details" type="light" className="mt-2" />
<div className="transfer-asset__block my-2" style={{ display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
<div className="transfer-asset__block my-2" style={{ display: 'flex', alignItems: 'center', justifyContent: 'center' ,padding:"2rem"}}>
<SwapDetails token1={swapPair.token1} token2={swapPair.token2} fees={swapPair.fees} />

</div>
Expand Down
5 changes: 2 additions & 3 deletions src/pages/dashboard/Activity/SwapActivityItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,9 @@ const SwapActivityItem = ({ token1, token2, fees }: Props): JSX.Element => (

<div className="activity-item__content">
<div
className="activity-item__info"
style={{ display: 'flex', justifyContent: 'space-between' }}
style={{ display: 'flex', justifyContent: 'space-between',width:"100%" }}
>
<div>
<div style={{width:"100%"}}>
<div
className="activity-item__title"
title={`Swap ${token1.token.symbol}-${token2.token.symbol}`}
Expand Down
145 changes: 61 additions & 84 deletions src/pages/dashboard/Activity/SwapDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,97 +70,74 @@ function SwapDetails({ token1, token2, fees }:Props):JSX.Element {
);
}, [token2.token.iconUrl]);
return (

<div style={{ display: 'flex', width: '100%', justifyContent: 'space-between' }}>
<div style={{ display: 'flex', flexDirection: 'column', justifyContent: 'space-around' }}>
<Uik.Text type="mini" text={`${type1 === 'receive'?'Received':"Sent"} ${token1.token.name}`} />
<div className="mb-3">
<Uik.Text type="mini" text={`${type2 === 'receive'?'Received':"Sent"} ${token2.token.name}`} />
</div>
</div>
<div style={{ display: 'flex', flexDirection: 'column' }}>
<div>
<div style={{ display: 'flex' }}>
<div style={{
display: 'flex', flexDirection: 'column', justifyContent: 'space-around', width: '14rem',
}}
<div
className="activity-item__amount-wrapper"
title={`${type1 === 'receive' ? '+' : '-'} ${showBalance(token1.token as Token)}`}
>
<div
className={`
activity-item__amount-swap activity-item__amount
${type1 === 'receive' ? 'activity-item__amount-swap-receive' : ''}
${hideBalance.isHidden ? 'activity-item__amount--hidden' : ''}
`}
>
<Uik.Text type="mini" text={`Sent ${token1.token.name}`} />
<div className="mb-3">
<Uik.Text type="mini" text={`Received ${token2.token.name}`} />
</div>
</div>
<div style={{ display: 'flex', flexDirection: 'column' }}>
<div>
<div
className="activity-item__amount-wrapper"
title={`${type1 === 'receive' ? '+' : '-'} ${showBalance(
token1.token as Token,
)}`}
>
<div
className={`
activity-item__amount-swap activity-item__amount
${
type1 === 'receive'
? 'activity-item__amount-swap-receive'
: ''
}
${
hideBalance.isHidden
? 'activity-item__amount--hidden'
: ''
}
`}
>
{!hideBalance.isHidden ? (
amount1
) : (
<div>
<div />
<div />
<div />
<div />
<div />
</div>
)}
</div>
{activityPreviewIcon1}
{!hideBalance.isHidden ? (
amount1
) : (
<div>
<div />
<div />
<div />
<div />
<div />
</div>
<div
className="activity-item__amount-wrapper"
title={`${type2 === 'receive' ? '+' : '-'} ${showBalance(
token2.token as Token,
)}`}
>
<div
className={`
activity-item__amount-swap
activity-item__amount
${
type2 === 'receive'
? 'activity-item__amount-swap-receive'
: ''
}
${
hideBalance.isHidden
? 'activity-item__amount--hidden'
: ''
}
`}
>
{!hideBalance.isHidden ? (
amount2
) : (
<div>
<div />
<div />
<div />
<div />
<div />
</div>
)}
</div>
{activityPreviewIcon2}
</div>
<div className="activity-item__amount---swap-fees">
{`fee - ${displayBalanceFromToken(fees.token as Token)} REEF`}
)}
</div>
{activityPreviewIcon1}
</div>
<div
className="activity-item__amount-wrapper"
title={`${type2 === 'receive' ? '+' : '-'} ${showBalance(token2.token as Token)}`}
>
<div
className={`
activity-item__amount-swap
activity-item__amount
${type2 === 'receive' ? 'activity-item__amount-swap-receive' : ''}
${hideBalance.isHidden ? 'activity-item__amount--hidden' : ''}
`}
>
{!hideBalance.isHidden ? (
amount2
) : (
<div>
<div />
<div />
<div />
<div />
<div />
</div>
</div>
)}
</div>
{activityPreviewIcon2}
</div>
<div className="activity-item__amount---swap-fees">
{`fee - ${displayBalanceFromToken(fees.token as Token)} REEF`}
</div>
</div>
</div>
</div>

);
}

Expand Down
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6478,9 +6478,9 @@ bindings@^1.3.0, bindings@^1.5.0:
dependencies:
file-uri-to-path "1.0.0"

"bip32-ed25519@git+https://github.com/Zondax/bip32-ed25519.git":
"bip32-ed25519@https://github.com/Zondax/bip32-ed25519":
version "0.0.4"
resolved "git+https://github.com/Zondax/bip32-ed25519.git#0949df01b5c93885339bc28116690292088f6134"
resolved "https://github.com/Zondax/bip32-ed25519#0949df01b5c93885339bc28116690292088f6134"
dependencies:
bn.js "^5.1.1"
elliptic "^6.4.1"
Expand Down
Loading