From 69c7c17ff3611572a3d0afd37609dd8ae1649e4e Mon Sep 17 00:00:00 2001 From: aelassas Date: Mon, 7 Oct 2024 22:23:07 +0100 Subject: [PATCH] Fix page.tsx --- backend/src/app/(pages)/(login)/sign-up/page.tsx | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/backend/src/app/(pages)/(login)/sign-up/page.tsx b/backend/src/app/(pages)/(login)/sign-up/page.tsx index 1f141e7..22620b7 100644 --- a/backend/src/app/(pages)/(login)/sign-up/page.tsx +++ b/backend/src/app/(pages)/(login)/sign-up/page.tsx @@ -1,6 +1,7 @@ 'use client' import React, { useState, useEffect } from 'react' +import { notFound } from 'next/navigation' import { strings as commonStrings } from '@/lang/common' import { strings } from '@/lang/sign-up' import * as wexcommerceTypes from ':wexcommerce-types' @@ -54,9 +55,9 @@ const SignUp: React.FC = () => { } }, [language, router]) - useEffect(() => { - - }, [router]) + if (process.env.NODE_ENV === 'production') { + return notFound() + } const handleOnChangeFullName = (e: React.ChangeEvent) => { setFullName(e.target.value) @@ -271,11 +272,4 @@ const SignUp: React.FC = () => { ) } -export function getStaticProps() { - return { - // returns the default 404 page with a status code of 404 in production - notFound: process.env.NODE_ENV === 'production' - } -} - export default SignUp