Pin phone sheets to the visible viewport, and let people correct login and organizer errors.
This commit is contained in:
1 parent
27d74e510c
commit
39807ef452
17 files changed
+236
-16
No files matched your search
@@ -26,7 +26,7 @@ const LoginContainer = memo<LoginProps>(
|
||||
const backdropRef = useRef<HTMLDivElement>(null);
|
||||
const previousActiveElementRef = useRef<HTMLElement | null>(null);
|
||||
const [portalReady, setPortalReady] = useState(() => !usePortal);
|
||||
const viewportHeight = useVisualViewportHeight(isOpen);
|
||||
const viewport = useVisualViewportHeight(isOpen);
|
||||
|
||||
// Defer enabling the portal until after the layout commit so we don’t sync-setState
|
||||
// inside the effect (eslint react-hooks/set-state-in-effect) while still mounting
|
||||
@@ -135,7 +135,8 @@ const LoginContainer = memo<LoginProps>(
|
||||
portalReady={portalReady}
|
||||
usePortal={usePortal}
|
||||
backdropVariant={backdropVariant}
|
||||
viewportHeight={viewportHeight}
|
||||
viewportHeight={viewport?.height}
|
||||
viewportOffsetTop={viewport?.offsetTop}
|
||||
>
|
||||
{children}
|
||||
</LoginView>
|
||||
|
||||
Reference in new issue
Block a user