diff --git a/components/public/section-drawer.tsx b/components/public/section-drawer.tsx
deleted file mode 100644
index cfa20c3..0000000
--- a/components/public/section-drawer.tsx
+++ /dev/null
@@ -1,53 +0,0 @@
-"use client";
-
-import { ListTreeIcon } from "lucide-react";
-
-import { Button } from "@/components/ui/button";
-import {
- Drawer,
- DrawerClose,
- DrawerContent,
- DrawerDescription,
- DrawerHeader,
- DrawerTitle,
- DrawerTrigger,
-} from "@/components/ui/drawer";
-
-export interface GuideSectionLink {
- id: string;
- label: string;
-}
-
-export function SectionDrawer({ sections }: { sections: GuideSectionLink[] }) {
- return (
-
-
- }>
-
- สารบัญหน้านี้
-
-
-
- สารบัญหน้านี้
- เลือกหัวข้อเพื่อเลื่อนไปยังเนื้อหา
-
-
-
-
-
- );
-}
diff --git a/components/site-install-button.tsx b/components/site-install-button.tsx
deleted file mode 100644
index 74e0e56..0000000
--- a/components/site-install-button.tsx
+++ /dev/null
@@ -1,76 +0,0 @@
-"use client";
-
-import { useEffect, useState } from "react";
-import { DownloadIcon } from "lucide-react";
-
-import { Button } from "@/components/ui/button";
-import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle } from "@/components/ui/dialog";
-
-type InstallEvent = Event & {
- prompt: () => Promise;
- userChoice: Promise<{ outcome: string }>;
-};
-
-export function SiteInstallButton() {
- const [open, setOpen] = useState(false);
- const [installed, setInstalled] = useState(false);
- const [installEvent, setInstallEvent] = useState(null);
- const [busy, setBusy] = useState(false);
- const [error, setError] = useState("");
-
- useEffect(() => {
- const displayMode = window.matchMedia("(display-mode: standalone)");
- const frame = requestAnimationFrame(() => setInstalled(displayMode.matches ||
- (navigator as Navigator & { standalone?: boolean }).standalone === true));
- const beforeInstall = (event: Event) => {
- event.preventDefault();
- setInstallEvent(event as InstallEvent);
- };
- const onInstalled = () => { setInstalled(true); setOpen(false); setInstallEvent(null); };
- window.addEventListener("beforeinstallprompt", beforeInstall);
- window.addEventListener("appinstalled", onInstalled);
- return () => {
- cancelAnimationFrame(frame);
- window.removeEventListener("beforeinstallprompt", beforeInstall);
- window.removeEventListener("appinstalled", onInstalled);
- };
- }, []);
-
- async function install() {
- if (!installEvent || busy) return;
- setBusy(true);
- setError("");
- try {
- await installEvent.prompt();
- const result = await installEvent.userChoice;
- setInstallEvent(null);
- if (result.outcome === "accepted") setOpen(false);
- } catch { setError("ติดตั้งไม่สำเร็จ กรุณาลองจากเมนูของเบราว์เซอร์"); }
- finally { setBusy(false); }
- }
-
- if (installed) return null;
-
- return <>
-
-
- >;
-}