feat(workflows): hide navigation and disable workflows page in production
This commit is contained in:
parent
88815f6895
commit
628faa7e24
2 changed files with 13 additions and 6 deletions
|
|
@ -45,12 +45,14 @@ export default function DashboardLayout({
|
||||||
>
|
>
|
||||||
{lang === "en" ? "Interviews" : "Entrevistas"}
|
{lang === "en" ? "Interviews" : "Entrevistas"}
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
{process.env.NODE_ENV !== "production" && (
|
||||||
href="/workflows"
|
<Link
|
||||||
className="text-sm text-slate-600 dark:text-slate-300 hover:text-slate-900 dark:hover:text-white font-medium transition-colors"
|
href="/workflows"
|
||||||
>
|
className="text-sm text-slate-600 dark:text-slate-300 hover:text-slate-900 dark:hover:text-white font-medium transition-colors"
|
||||||
{lang === "en" ? "Workflows" : "Flujos de Trabajo"}
|
>
|
||||||
</Link>
|
{lang === "en" ? "Workflows" : "Flujos de Trabajo"}
|
||||||
|
</Link>
|
||||||
|
)}
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { useApp } from "@/components/AppContext";
|
import { useApp } from "@/components/AppContext";
|
||||||
|
import { notFound } from "next/navigation";
|
||||||
|
|
||||||
const translations = {
|
const translations = {
|
||||||
en: {
|
en: {
|
||||||
|
|
@ -47,6 +48,10 @@ const translations = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function WorkflowsPage() {
|
export default function WorkflowsPage() {
|
||||||
|
if (process.env.NODE_ENV === "production") {
|
||||||
|
notFound();
|
||||||
|
}
|
||||||
|
|
||||||
const { lang } = useApp();
|
const { lang } = useApp();
|
||||||
const t = translations[lang];
|
const t = translations[lang];
|
||||||
const webhookUrl = process.env.NEXT_PUBLIC_N8N_WEBHOOK_URL || "";
|
const webhookUrl = process.env.NEXT_PUBLIC_N8N_WEBHOOK_URL || "";
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue