"use client";

import { useApp } from "@/context/app";
import { useGlobal } from "@/context/global";
import { useEffect } from "react";
import { DownloadLinksTable } from "./components/table";

export default function DownloadLinksPage() {
  const { dict } = useGlobal();
  const { setHeader } = useApp();

  useEffect(() => {
    setHeader({
      title: {
        link: "/dashboard",
        text: dict.pages.general.navigation.dashboard,
        path: [
          { link: "downloads", text: dict.pages.general.navigation.downloads },
        ],
      },
    });

    return () => {
      setHeader(undefined);
    };
  }, [dict]);

  return <DownloadLinksTable />;
}
