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: vertical scrolling after opening the Mobile paring modal #1295

Merged
merged 9 commits into from
Dec 6, 2022
7 changes: 5 additions & 2 deletions src/services/pairing/QRModal.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useState } from 'react'
import { Dialog, DialogContent, DialogTitle, IconButton } from '@mui/material'
import { createRoot } from 'react-dom/client'
import CloseIcon from '@mui/icons-material/Close'

import PairingQRCode from '@/components/common/PairingDetails/PairingQRCode'
import PairingDescription from '@/components/common/PairingDetails/PairingDescription'
import { StoreHydrator } from '@/store'
Expand Down Expand Up @@ -49,15 +49,18 @@ const close = () => {
}

const Modal = ({ uri, cb }: { uri: string; cb: () => void }) => {
const [open, setOpen] = useState(true)

const handleClose = () => {
cb()
setOpen(false)
close()
}

return (
<StoreHydrator>
<AppProviders>
<Dialog open onClose={handleClose} disablePortal className={css.modal}>
<Dialog open={open} onClose={handleClose} disablePortal className={css.modal}>
<DialogTitle sx={{ m: 0, p: 2, display: 'flex', justifyContent: 'space-between' }}>
{PAIRING_MODULE_LABEL}
<IconButton
Expand Down