import { I18nProvider } from "@/i18n";
import ClientMonitorPage from "@/components/ClientMonitor/ClientMonitorPage";
import { isMonitoringEnabled } from "@/config/monitoring";
import { Metadata } from "next";
import { redirect } from "next/navigation";

export const metadata: Metadata = {
  title: "裝置連線監控",
};

export default function ClientMonitorRoutePage() {
  if (!isMonitoringEnabled) {
    redirect("/settings/user");
  }
  return (
    <I18nProvider namespaces={["clientMonitor", "navigation", "common"]}>
      <ClientMonitorPage />
    </I18nProvider>
  );
}
