Fix alerts position

This commit is contained in:
J Francisco Rader committed 2021-03-01 12:37:13 -05:00
1 parent 83a093e36b
commit 12ed0bd46d
2 files changed
+12 -8

No files matched your search

+4 -4
View File
@@ -14,8 +14,8 @@ import { useHistory, useLocation } from 'react-router-dom';
const NOTIFICATION_ID = 'call:current'; const NOTIFICATION_ID = 'call:current';
/* InjectDebugData<CallProps | boolean>([ InjectDebugData<CallProps | boolean>([
{ /* {
app: 'CALL', app: 'CALL',
method: 'setCaller', method: 'setCaller',
data: { data: {
@@ -30,8 +30,8 @@ const NOTIFICATION_ID = 'call:current';
app: 'CALL', app: 'CALL',
method: 'callModal', method: 'callModal',
data: true, data: true,
}, }, */
]); */ ]);
export const useCallService = () => { export const useCallService = () => {
const { t } = useTranslation(); const { t } = useTranslation();
+8 -4
View File
@@ -6,10 +6,16 @@ import Alert from './Alert';
const useStyles = makeStyles({ const useStyles = makeStyles({
root: { root: {
marginTop: '-100px',
display: 'flex', display: 'flex',
justifyContent: 'center', justifyContent: 'center',
alignItems: '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 ( return (
<div className={classes.root}> <div className={classes.root}>
{alert ? ( {alert ? (
<Alert severity={alert.type}> <Alert severity={alert.type}>{t('APPS_' + alert.message)}</Alert>
{t('APPS_' + alert.message)}
</Alert>
) : null} ) : null}
</div> </div>
); );