Compare commits

..

2 Commits

Author SHA1 Message Date
lance chant
410b337bdc Merge branch 'develop' into fix/save-account-modal 2026-06-09 08:07:12 +02:00
Lance Chant
55d2b240e1 fix: an issue with save account didn't show the modal
Fixed the modal to show now when save account is toggled on

Signed-off-by: Lance Chant <13349722+lancechant@users.noreply.github.com>
2026-06-09 08:04:41 +02:00

View File

@@ -69,17 +69,23 @@ export const SaveAccountModal: React.FC<SaveAccountModalProps> = ({
[isAndroid],
);
const isPresentedRef = useRef(false);
useEffect(() => {
if (visible) {
bottomSheetModalRef.current?.present();
} else {
} else if (isPresentedRef.current) {
bottomSheetModalRef.current?.dismiss();
isPresentedRef.current = false;
}
}, [visible]);
const handleSheetChanges = useCallback(
(index: number) => {
if (index === -1) {
if (index >= 0) {
isPresentedRef.current = true;
} else if (index === -1 && isPresentedRef.current) {
isPresentedRef.current = false;
resetState();
onClose();
}