diff --git a/src/components/dialogs/nuxs/NeueChar.tsx b/src/components/dialogs/nuxs/NeueChar.tsx index fdd6d14edd..7a35db46cd 100644 --- a/src/components/dialogs/nuxs/NeueChar.tsx +++ b/src/components/dialogs/nuxs/NeueChar.tsx @@ -24,7 +24,6 @@ export function NeueChar() { const nuxDialogs = useNuxDialogContext() const control = Dialog.useDialogControl() const {gtMobile} = useBreakpoints() - const [height, setHeight] = React.useState(0) Dialog.useAutoOpen(control, 3e3) @@ -37,17 +36,14 @@ export function NeueChar() { { - setHeight(e.nativeEvent.layout.height) - }} style={[ a.absolute, a.inset_0, a.overflow_hidden, { - backgroundColor: 'black', bottom: 'auto', - paddingTop: gtMobile ? '42%' : '60%', + aspectRatio: gtMobile ? 1 / 0.42 : 1 / 0.6, + backgroundColor: 'black', borderTopLeftRadius: a.rounded_md.borderRadius, borderTopRightRadius: a.rounded_md.borderRadius, }, @@ -74,17 +70,14 @@ export function NeueChar() { /> - + {/* approx the height of the main image - not quite accurate, + since the image excludes the padding. but if you inspect element, + it turns out to be close enough */} +