Skip to content

Commit

Permalink
add manual open app link
Browse files Browse the repository at this point in the history
  • Loading branch information
lukachi committed Jun 25, 2024
1 parent 4366ae3 commit 24ef812
Showing 1 changed file with 28 additions and 22 deletions.
50 changes: 28 additions & 22 deletions src/pages/DownloadApp/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IconButton, Paper, Stack, Typography, useTheme } from '@mui/material'
import { IconButton, Link, Paper, Stack, Typography, useTheme } from '@mui/material'
import { QRCode } from 'react-qrcode-logo'
import { useSearchParams } from 'react-router-dom'

Expand Down Expand Up @@ -47,28 +47,34 @@ export default function DownloadApp({ extCode }: Props) {
)}
</Stack>
{code && (
<Stack
width='100%'
direction='row'
gap={2}
justifyContent='center'
p={3}
bgcolor={palette.action.active}
border={2}
borderColor={palette.divider}
borderRadius={2}
>
<Typography
variant='subtitle2'
color={palette.text.primary}
letterSpacing={3}
textAlign='center'
<Stack spacing={2} alignItems='center'>
<Stack
width='100%'
direction='row'
gap={2}
justifyContent='center'
p={3}
bgcolor={palette.action.active}
border={2}
borderColor={palette.divider}
borderRadius={2}
>
{code}
</Typography>
<IconButton color={isCopied ? 'success' : 'primary'} onClick={() => copy(code)}>
<UiIcon name={isCopied ? Icons.Check : Icons.CopySimple} size={5} />
</IconButton>
<Typography
variant='subtitle2'
color={palette.text.primary}
letterSpacing={3}
textAlign='center'
>
{code}
</Typography>
<IconButton color={isCopied ? 'success' : 'primary'} onClick={() => copy(code)}>
<UiIcon name={isCopied ? Icons.Check : Icons.CopySimple} size={5} />
</IconButton>
</Stack>

<Link href={`${window.origin}/r/${code}`} variant='body3' color={palette.text.primary}>
Open app
</Link>
</Stack>
)}
</Paper>
Expand Down

0 comments on commit 24ef812

Please sign in to comment.