Skip to content

Commit

Permalink
fix(rupture-co): cacher le simulateur rupture-co en production (#5838)
Browse files Browse the repository at this point in the history
* fix: hide rupture co

* fix: ok

* fix: ok
  • Loading branch information
maxgfr committed May 3, 2024
1 parent 88ca997 commit d2ed6dd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/code-du-travail-frontend/pages/outils/[slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,10 @@ export const getServerSideProps: GetServerSideProps<Props> = async ({
query,
}) => {
const tool = await fetchTool(query.slug as string);
if (!tool) {
if (
!tool ||
(process.env.NEXT_PUBLIC_IS_PRODUCTION_DEPLOYMENT && !tool.displayTool) // En production, ne pas afficher les outils en displayTool à false
) {
return {
notFound: true,
};
Expand Down

0 comments on commit d2ed6dd

Please sign in to comment.