Advertisement
kopyl

Untitled

Aug 28th, 2022
1,108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const [open, setOpen] = useState(false);
  2.  
  3. const handleOpen = () => setOpen(true);
  4.   const handleClose = () => setOpen(false);
  5.  
  6.   const theme = useTheme();
  7.   const matches = useMediaQuery(theme.breakpoints.down("sm"));
  8.  
  9.   useEffect(() => {
  10.     setOpen(matches);
  11.   }, [matches]);
  12.  
  13. <Dialog
  14.   open={open}
  15.   onClose={handleClose}
  16.   aria-labelledby="alert-dialog-title"
  17.   aria-describedby="alert-dialog-description"
  18. >
  19.   <DialogTitle id="alert-dialog-title">
  20.     {"Sorry for no mobile experience"}
  21.   </DialogTitle>
  22.   <DialogContent>
  23.     <DialogContentText id="alert-dialog-description">
  24.       Sorry, at this time this onboarding is best to be experienced on a
  25.       desktop. But we{"'"}ll make the mobile version real soon.
  26.     </DialogContentText>
  27.   </DialogContent>
  28.   <DialogActions>
  29.     <Button onClick={handleClose} autoFocus>
  30.       Okay
  31.     </Button>
  32.   </DialogActions>
  33. </Dialog>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement