From 12ed0bd46dedeed82994e20d05d2a944f63820a5 Mon Sep 17 00:00:00 2001 From: J Francisco Rader Date: Mon, 1 Mar 2021 12:37:13 -0500 Subject: [PATCH] Fix alerts position --- phone/src/os/call/hooks/useCallService.tsx | 8 ++++---- phone/src/ui/components/Snackbar.tsx | 12 ++++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/phone/src/os/call/hooks/useCallService.tsx b/phone/src/os/call/hooks/useCallService.tsx index 65edc18..cc39dc8 100644 --- a/phone/src/os/call/hooks/useCallService.tsx +++ b/phone/src/os/call/hooks/useCallService.tsx @@ -14,8 +14,8 @@ import { useHistory, useLocation } from 'react-router-dom'; const NOTIFICATION_ID = 'call:current'; -/* InjectDebugData([ - { +InjectDebugData([ + /* { app: 'CALL', method: 'setCaller', data: { @@ -30,8 +30,8 @@ const NOTIFICATION_ID = 'call:current'; app: 'CALL', method: 'callModal', data: true, - }, -]); */ + }, */ +]); export const useCallService = () => { const { t } = useTranslation(); diff --git a/phone/src/ui/components/Snackbar.tsx b/phone/src/ui/components/Snackbar.tsx index 3fbeca1..ab1972b 100644 --- a/phone/src/ui/components/Snackbar.tsx +++ b/phone/src/ui/components/Snackbar.tsx @@ -6,10 +6,16 @@ import Alert from './Alert'; const useStyles = makeStyles({ root: { - marginTop: '-100px', display: 'flex', justifyContent: 'center', alignItems: 'center', + height: '50%', + overflow: 'auto', + margin: '0 auto', + position: 'absolute', + left: 0, + bottom: '-100px', + right: 0, }, }); @@ -21,9 +27,7 @@ export const Snackbar = () => { return (
{alert ? ( - - {t('APPS_' + alert.message)} - + {t('APPS_' + alert.message)} ) : null}
);