mirror of
https://github.com/trafficlunar/blockmatic.git
synced 2026-06-28 06:34:13 +00:00
feat: mobile notice
This commit is contained in:
parent
1b159ff70f
commit
5d8b073a1e
2 changed files with 37 additions and 0 deletions
34
src/components/MobileNotice.tsx
Normal file
34
src/components/MobileNotice.tsx
Normal 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;
|
||||
Loading…
Add table
Add a link
Reference in a new issue