forked from mosip/esignet-signup
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* UI: Signup, forgot password landing page * add const for redirect route --------- Co-authored-by: Sreang Rathanak <[email protected]> Signed-off-by: Sreang Rathanak <[email protected]>
- Loading branch information
1 parent
b11f525
commit 3a432ad
Showing
7 changed files
with
78 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
export const ROOT_ROUTE = "/"; | ||
export const SIGNUP_ROUTE = "/signup"; | ||
export const RESET_PASSWORD = "/reset-password"; | ||
export const SOMETHING_WENT_WRONG = "/something-went-wrong"; | ||
export const UNDER_CONSTRUCTION = "/under-construction"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { useTranslation } from "react-i18next"; | ||
import { useNavigate, useLocation } from "react-router-dom"; | ||
|
||
import { SIGNUP_ROUTE, RESET_PASSWORD } from "~constants/routes"; | ||
import { ReactComponent as SomethingWentWrongSvg } from "~assets/svg/something-went-wrong.svg"; | ||
import { Button } from "~components/ui/button"; | ||
|
||
export const LandingPage = () => { | ||
const { t } = useTranslation(); | ||
const navigate = useNavigate(); | ||
const { hash: fromSignInHash } = useLocation(); | ||
|
||
const handleResetPassword = (e: any) => { | ||
e.preventDefault(); | ||
navigate(`${RESET_PASSWORD}${fromSignInHash}`); | ||
} | ||
|
||
const handleRegister = (e: any) => { | ||
e.preventDefault(); | ||
navigate(`${SIGNUP_ROUTE}${fromSignInHash}`); | ||
} | ||
|
||
return ( | ||
<div className="flex h-[calc(100vh-14vh)] w-full items-center justify-center p-16 px-32 sm:px-[30px]"> | ||
<div className="h-full bg-white flex w-full flex-col items-center justify-center gap-y-8 rounded-xl shadow-lg md:shadow-none"> | ||
<SomethingWentWrongSvg/> | ||
<div className="flex flex-col items-center gap-y-2"> | ||
<h1 className="text-center text-2xl">{t("landing_page_title")}</h1> | ||
<p className="text-center text-gray-500">{t("landing_page_description")}</p> | ||
</div> | ||
<div className="flex flex-row sm:flex-col items-center gap-x-2 w-full items-center justify-center"> | ||
<Button className="h-[52px] w-[200px] border-primary border-[2px] text-primary hover:text-primary/80 bg-white sm:mb-3 sm:w-full" | ||
variant="outline" | ||
onClick={handleResetPassword}> | ||
{t("reset_password")} | ||
</Button> | ||
<Button className="h-[52px] w-[200px] sm:w-full" onClick={handleRegister}> | ||
{t("register")} | ||
</Button> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { LandingPage as default } from "./LandingPage"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters