initialised commit on the ui converted in mui to astryx and changed the design to doormile
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
import { useEffect, useState, useRef } from 'react';
|
||||
import { useTheme } from '@mui/material/styles';
|
||||
import WifiOffIcon from '@mui/icons-material/WifiOff';
|
||||
import WifiIcon from '@mui/icons-material/Wifi';
|
||||
import { MdWifiOff, MdWifi } from 'react-icons/md';
|
||||
|
||||
const NOTIFICATION_STYLE = {
|
||||
position: 'fixed',
|
||||
@@ -21,7 +19,6 @@ const NOTIFICATION_STYLE = {
|
||||
};
|
||||
|
||||
const InternetStatus = () => {
|
||||
const theme = useTheme();
|
||||
const [isOnline, setIsOnline] = useState(navigator.onLine);
|
||||
const [showBackOnline, setShowBackOnline] = useState(false);
|
||||
const wasOffline = useRef(!navigator.onLine);
|
||||
@@ -64,13 +61,13 @@ const InternetStatus = () => {
|
||||
<div
|
||||
style={{
|
||||
...NOTIFICATION_STYLE,
|
||||
backgroundColor: theme.palette.error.main,
|
||||
backgroundColor: 'var(--color-error, #d32f2f)',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
gap: '10px'
|
||||
}}
|
||||
>
|
||||
<WifiOffIcon style={{ color: '#fff' }} />
|
||||
<MdWifiOff style={{ color: '#fff' }} />
|
||||
No Internet Connection
|
||||
</div>
|
||||
)}
|
||||
@@ -79,13 +76,13 @@ const InternetStatus = () => {
|
||||
<div
|
||||
style={{
|
||||
...NOTIFICATION_STYLE,
|
||||
backgroundColor: theme.palette.success.main,
|
||||
backgroundColor: 'var(--color-success, #2e7d32)',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
gap: '10px'
|
||||
}}
|
||||
>
|
||||
<WifiIcon style={{ color: '#fff' }} />
|
||||
<MdWifi style={{ color: '#fff' }} />
|
||||
Back Online
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user