From 856c799065c9133b37409c863cd231144e6caef4 Mon Sep 17 00:00:00 2001 From: André Fernandes Date: Wed, 5 Feb 2025 18:12:50 +0000 Subject: Wrap error messages in Layout.Center (#7655) * Added Portal to ErrorMessage to stack it on top of the view * Changing Portal solution for Layout.Center according to PR suggestion --- src/view/com/util/error/ErrorMessage.tsx | 68 +++++++++++++++++--------------- 1 file changed, 37 insertions(+), 31 deletions(-) (limited to 'src/view/com/util/error/ErrorMessage.tsx') diff --git a/src/view/com/util/error/ErrorMessage.tsx b/src/view/com/util/error/ErrorMessage.tsx index c09d1b2e6..50e55e70c 100644 --- a/src/view/com/util/error/ErrorMessage.tsx +++ b/src/view/com/util/error/ErrorMessage.tsx @@ -14,6 +14,7 @@ import {useLingui} from '@lingui/react' import {usePalette} from '#/lib/hooks/usePalette' import {useTheme} from '#/lib/ThemeContext' +import * as Layout from '#/components/Layout' import {Text} from '../text/Text' export function ErrorMessage({ @@ -31,39 +32,44 @@ export function ErrorMessage({ const pal = usePalette('error') const {_} = useLingui() return ( - - - - - - {message} - - {onPressTryAgain && ( - + + + - - )} - + + + {message} + + {onPressTryAgain && ( + + + + )} + + ) } -- cgit 1.4.1