aboutsummaryrefslogtreecommitdiffstats
path: root/apps/web/app/dashboard/wrapped/page.tsx
blob: f479aca77dfb998841113ce7777c982125cd00f8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
"use client";

import { useEffect } from "react";
import { useRouter } from "next/navigation";
import { WrappedModal } from "@/components/wrapped";

export default function WrappedPage() {
  const router = useRouter();

  const handleClose = () => {
    router.push("/dashboard/bookmarks");
  };

  // Always show the modal when this page is loaded
  useEffect(() => {
    // Prevent page from being scrollable when modal is open
    document.body.style.overflow = "hidden";
    return () => {
      document.body.style.overflow = "";
    };
  }, []);

  return <WrappedModal open={true} onClose={handleClose} />;
}