feat: mobile notice

This commit is contained in:
trafficlunar 2025-02-03 21:18:55 +00:00
parent 1b159ff70f
commit 5d8b073a1e
2 changed files with 37 additions and 0 deletions

View file

@ -0,0 +1,34 @@
import { useEffect, useState } from "react";
import { SmartphoneIcon } from "lucide-react";
import { Button } from "@/components/ui/button";
import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle } from "@/components/ui/dialog";
function MobileNotice() {
const [isOpen, setIsOpen] = useState(false);
useEffect(() => {
setIsOpen(window.innerWidth <= 600);
}, []);
return (
<Dialog open={isOpen} onOpenChange={(open) => setIsOpen(open)}>
<DialogContent className="w-96 rounded-lg">
<DialogHeader className="flex items-center">
<SmartphoneIcon size={64} className="mb-2" />
<DialogTitle>Phone Detected</DialogTitle>
<DialogDescription>Using a phone with Blockmatic is not supported as of right now. Proceed with caution.</DialogDescription>
</DialogHeader>
<DialogFooter>
<DialogClose>
<Button type="button">Close</Button>
</DialogClose>
</DialogFooter>
</DialogContent>
</Dialog>
);
}
export default MobileNotice;