Commit 7c430238 authored by Ian Lapham's avatar Ian Lapham Committed by GitHub

fix DOM warnings (#741)

* fix DOM warnings

* Update index.tsx
Co-authored-by: default avatarNoah Zinsmeister <noahwz@gmail.com>
parent 843d5e79
...@@ -528,7 +528,8 @@ function ExchangePage({ sendingInput = false, history, params }: ExchangePagePro ...@@ -528,7 +528,8 @@ function ExchangePage({ sendingInput = false, history, params }: ExchangePagePro
setPendingConfirmation(false) setPendingConfirmation(false)
}) })
) )
.catch(() => { .catch(e => {
console.error(e)
resetModal() resetModal()
setShowConfirm(false) setShowConfirm(false)
}) })
......
...@@ -40,7 +40,9 @@ const StyledDialogOverlay = styled(AnimatedDialogOverlay)` ...@@ -40,7 +40,9 @@ const StyledDialogOverlay = styled(AnimatedDialogOverlay)`
} }
` `
const StyledDialogContent = styled(DialogContent)<{ mobile?: boolean }>` // destructure to not pass custom props to Dialog DOM element
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const StyledDialogContent = styled(({ minHeight, maxHeight, mobile, isOpen, ...rest }) => <DialogContent {...rest} />)`
&[data-reach-dialog-content] { &[data-reach-dialog-content] {
margin: 0 0 2rem 0; margin: 0 0 2rem 0;
border: 1px solid ${({ theme }) => theme.bg1}; border: 1px solid ${({ theme }) => theme.bg1};
...@@ -61,7 +63,6 @@ const StyledDialogContent = styled(DialogContent)<{ mobile?: boolean }>` ...@@ -61,7 +63,6 @@ const StyledDialogContent = styled(DialogContent)<{ mobile?: boolean }>`
min-height: ${minHeight}vh; min-height: ${minHeight}vh;
`} `}
display: flex; display: flex;
/* overflow: hidden; */
border-radius: 20px; border-radius: 20px;
${({ theme }) => theme.mediaWidth.upToMedium` ${({ theme }) => theme.mediaWidth.upToMedium`
width: 65vw; width: 65vw;
...@@ -191,14 +192,14 @@ export default function Modal({ ...@@ -191,14 +192,14 @@ export default function Modal({
style={props} style={props}
onDismiss={onDismiss} onDismiss={onDismiss}
initialFocusRef={initialFocusRef} initialFocusRef={initialFocusRef}
mobile={isMobile} mobile={isMobile ? isMobile : undefined}
> >
<StyledDialogContent <StyledDialogContent
hidden={true} hidden={true}
minHeight={minHeight} minHeight={minHeight}
maxHeight={maxHeight} maxHeight={maxHeight}
isOpen={isOpen} isOpen={isOpen}
mobile={isMobile} mobile={isMobile ? isMobile : undefined}
> >
<HiddenCloseButton onClick={onDismiss} /> <HiddenCloseButton onClick={onDismiss} />
{children} {children}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment