File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ import { AuthProvider } from '@components/AuthProvider';
1111import { ProtectedRoute } from '@components/ProtectedRoute' ;
1212import { AdminRoute } from '@components/AdminRoute' ;
1313import { LoginPage } from '@containers/auth/LoginPage' ;
14+ import { Modal1Page } from '@containers/auth/Modal1Page' ;
15+ import { Modal2Page } from '@containers/auth/Modal2Page' ;
1416import { DashboardPage } from '@containers/dashboard/DashboardPage' ;
1517import { DonorStatsChart } from '@components/DonorStatsChart' ;
1618
@@ -24,6 +26,14 @@ const router = createBrowserRouter([
2426 path : '/login' ,
2527 element : < LoginPage /> ,
2628 } ,
29+ {
30+ path : '/modal1' ,
31+ element : < Modal1Page /> ,
32+ } ,
33+ {
34+ path : '/modal2' ,
35+ element : < Modal2Page /> ,
36+ } ,
2737 {
2838 path : '/dashboard' ,
2939 element : < ProtectedRoute /> ,
Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ import { Card , CardContent } from '../ui/card' ;
3+ import { Button } from '../ui/button' ;
4+ import fccLogo from '../../assets/fcc-logo.png' ;
5+
6+ interface HeaderDetailModalProps {
7+ heading : string ;
8+ details : string ;
9+ onSignInClick ?: ( ) => void ;
10+ }
11+
12+ export const HeaderDetailModal : React . FC < HeaderDetailModalProps > = ( {
13+ heading,
14+ details,
15+ onSignInClick,
16+ } ) => {
17+ return (
18+ < div className = "fixed inset-0 z-50 flex items-center justify-center p-4" >
19+ < Card className = "w-full max-w-[420px] bg-white shadow-2xl ring-0 rounded-[30px] px-5" >
20+ < CardContent className = "flex flex-col items-center gap-3 py-24 px-8 text-center" >
21+ < img src = { fccLogo } alt = "FCC logo" className = "w-[145px] h-[145px]" />
22+ < h1 className = "text-2xl font-semibold text-[#0c7962]" > { heading } </ h1 >
23+ < p className = "w-full text-base text-neutral-500 text-left whitespace-pre-line leading-tight" >
24+ { details }
25+ </ p >
26+ < Button
27+ variant = "success"
28+ onClick = { onSignInClick }
29+ className = "w-full h-12 text-base rounded-[50px] mt-5"
30+ >
31+ Sign in
32+ </ Button >
33+ </ CardContent >
34+ </ Card >
35+ </ div >
36+ ) ;
37+ } ;
Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ import { useNavigate } from 'react-router-dom' ;
3+ import { HeaderDetailModal } from '@components/HeaderDetailModal/HeaderDetailModal' ;
4+ import bostonBg from '../../assets/green-boston-background.png' ;
5+
6+ export const Modal1Page : React . FC = ( ) => {
7+ const navigate = useNavigate ( ) ;
8+
9+ const handleSignIn = ( ) => {
10+ navigate ( '/' ) ;
11+ } ;
12+
13+ return (
14+ < div
15+ className = "relative min-h-screen w-full bg-cover bg-center bg-no-repeat"
16+ style = { { backgroundImage : `url(${ bostonBg } )` } }
17+ >
18+ < HeaderDetailModal
19+ heading = "Check your email"
20+ details = "Instructions have been sent to your inbox."
21+ onSignInClick = { handleSignIn }
22+ />
23+ </ div >
24+ ) ;
25+ } ;
Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ import { useNavigate } from 'react-router-dom' ;
3+ import { HeaderDetailModal } from '@components/HeaderDetailModal/HeaderDetailModal' ;
4+ import bostonBg from '../../assets/green-boston-background.png' ;
5+
6+ export const Modal2Page : React . FC = ( ) => {
7+ const navigate = useNavigate ( ) ;
8+
9+ const handleSignIn = ( ) => {
10+ navigate ( '/' ) ;
11+ } ;
12+
13+ return (
14+ < div
15+ className = "relative min-h-screen w-full bg-cover bg-center bg-no-repeat"
16+ style = { { backgroundImage : `url(${ bostonBg } )` } }
17+ >
18+ < HeaderDetailModal
19+ heading = "Welcome!"
20+ details = {
21+ 'Your account has been successfully created.\n\nPlease wait for confirmation that your account has been verified by an admin.'
22+ }
23+ onSignInClick = { handleSignIn }
24+ />
25+ </ div >
26+ ) ;
27+ } ;
You can’t perform that action at this time.
0 commit comments