Skip to content

Commit

Permalink
ADD edge to compatible browsers
Browse files Browse the repository at this point in the history
  • Loading branch information
sproutmaster committed Feb 17, 2024
1 parent abac58c commit e2bd337
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions web/src/components/shared/DeviceWarning.jsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import React from 'react';
import {browserName, isChrome, isDesktop, isFirefox, isTablet} from 'react-device-detect';
import {browserName, isChrome, isEdgeChromium, isDesktop, isFirefox, isTablet} from 'react-device-detect';
import {useSnackbar} from 'notistack';

export default function DeviceWarning() {
const {enqueueSnackbar} = useSnackbar();

React.useEffect(() => {
const acceptDevice = isDesktop || isTablet;
const acceptBrowser = isChrome || isFirefox;
const acceptBrowser = isChrome || isFirefox || isEdgeChromium;
if (!acceptBrowser) {
enqueueSnackbar(`We noticed you are on ${browserName}. ` +
'Some things may not work as intended. ' +
'Try Firefox or Chrome if you run into any issues!', {variant: 'warning'});
'Try Firefox, Chrome or Edge if you run into any issues!', {variant: 'warning'});
return;
}
if (!acceptDevice) {
Expand Down

0 comments on commit e2bd337

Please sign in to comment.