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

Flip origin and destination #225

Merged
merged 2 commits into from
Aug 17, 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/components/Transfer/transferActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const TransferActions = () => {
};

return (
<Box width='60%' margin='0.5rem auto'>
<Box width='50%' margin='0.5rem auto'>
<Stack margin='0.5rem 0' direction='column' gap={0.5} alignItems='center'>
<ArrowDownward />
</Stack>
Expand Down
22 changes: 20 additions & 2 deletions src/components/Transfer/transferForm.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import CachedIcon from '@mui/icons-material/Cached';
import { Box, Paper, Stack, Typography } from '@mui/material';

import theme from '@/utils/muiTheme';
Expand All @@ -21,8 +22,14 @@ const TransferForm = () => {
setSelectedRegion,
} = useTransferState();

const flip = () => {
const oldOriginChain = originChain;
setOriginChain(destinationChain);
setDestinationChain(oldOriginChain);
};

return (
<Box width='60%' margin='0.5rem auto'>
<Box width='50%' margin='1rem auto'>
<Paper
sx={{
padding: '2rem',
Expand All @@ -41,8 +48,19 @@ const TransferForm = () => {
<ChainSelector chain={originChain} setChain={setOriginChain} />
</Stack>

<Box display='flex' justifyContent='center' mt='1.5rem'>
<CachedIcon
sx={{
color: theme.palette.common.black,
fontSize: '2rem',
cursor: 'pointer',
}}
onClick={flip}
/>
</Box>

{/* Destination Chain */}
<Stack margin='1rem 0' direction='column' gap='1rem'>
<Stack margin='0.5rem 0' direction='column' gap='1rem'>
<Typography
sx={{ color: theme.palette.common.black, fontSize: '1.25rem' }}
>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/paras/renewal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ const Renewal = () => {
<Banner
content={
'No more cores are on sale! Attempting to renew will fail. To avoid these kind of \
issues in the future, please renew during the interlude phase '
issues in the future, please renew during the interlude phase. '
}
link={{
title: 'Renewal FAQ',
Expand Down
Loading