diff --git a/client/next.config.js b/client/next.config.js index 7583cd3a3..6986e2345 100644 --- a/client/next.config.js +++ b/client/next.config.js @@ -21,6 +21,15 @@ const nextConfig = { destination: '/auth/signin', permanent: false, }, + ...(process.env.NEXT_PUBLIC_ENABLE_EUDR !== 'true' + ? [ + { + source: '/eudr', + destination: '/analysis/map', + permanent: false, + }, + ] + : []), ]; }, env: { diff --git a/client/src/layouts/application/component.tsx b/client/src/layouts/application/component.tsx index 61ea246c2..c8de60cdc 100644 --- a/client/src/layouts/application/component.tsx +++ b/client/src/layouts/application/component.tsx @@ -2,6 +2,7 @@ import { CollectionIcon as CollectionIconOutline } from '@heroicons/react/outlin import { CollectionIcon as CollectionIconSolid } from '@heroicons/react/solid'; // The'ChartBarIcon' fom the modules @heroicons/react are different from the website (and design) + import { ChartBarIconOutline, ChartBarIconSolid } from './icons/chart-bar'; import { useLasTask } from 'hooks/tasks'; @@ -30,14 +31,24 @@ const ApplicationLayout: React.FC = ({ children }) => { icon: { default: ChartBarIconOutline, active: ChartBarIconSolid }, disabled: !!(!lastTask || lastTask?.status === 'processing'), }, + ...(process.env.NEXT_PUBLIC_ENABLE_EUDR === 'true' + ? [ + { + name: 'EUDR', + href: '/eudr', + icon: { default: ReportSVG, active: ReportSVG }, + disabled: !!(!lastTask || lastTask?.status === 'processing'), + }, + ] + : []), ]; - navigationItems.push({ - name: 'EUDR', - href: '/eudr', - icon: { default: ReportSVG, active: ReportSVG }, - disabled: !!(!lastTask || lastTask?.status === 'processing'), - }); + // navigationItems.push({ + // name: 'EUDR', + // href: '/eudr', + // icon: { default: ReportSVG, active: ReportSVG }, + // disabled: !!(!lastTask || lastTask?.status === 'processing'), + // }); return (