"use client"; import { useTranslation } from "react-i18next"; import { useModules } from "@/hooks/useModules"; export default function ModulesPanel() { const { t } = useTranslation(); const { modules, error, reload } = useModules(); return (

{t("Modules")}

{t("Stop DeepTutor before changing modules. Removing a module keeps your data.")}

{error && } {!modules && !error &&

{t("Loading...")}

}
{modules?.map(module => {[module.installed, module.enabled, module.ready].map((value, index) => )} )}
{t("Module")}{t("Installed")} {t("Enabled")}{t("Ready")}{t("Command")}
{module.id} {module.issues.map(issue =>

{issue}

)}
{value ? t("Yes") : t("No")}{module.id === "core" ? "—" : `deeptutor module ${!module.installed ? "install" : !module.enabled ? "enable" : "disable"} ${module.id}`}
); }