11import { Typography , Box } from '@mui/material' ;
22import PageLayout from '../../components/PageLayout' ;
3- import ImageWithButton from './components/ImageWithButton' ;
43import { useHistory } from 'react-router-dom' ;
5- import { routes } from '../../utils/routes' ;
64import { useCurrentUser } from '../../hooks/users.hooks' ;
75import { useEffect } from 'react' ;
86import { useHomePageContext } from '../../app/HomePageContext' ;
97import { useCurrentOrganization } from '../../hooks/organizations.hooks' ;
108import LoadingIndicator from '../../components/LoadingIndicator' ;
119import ErrorPage from '../ErrorPage' ;
1210import { useGetImageUrl } from '../../hooks/onboarding.hook' ;
11+ import FeaturedProjects from './components/FeaturedProjects' ;
1312
1413const IntroGuestHomePage = ( ) => {
1514 const user = useCurrentUser ( ) ;
@@ -22,31 +21,31 @@ const IntroGuestHomePage = () => {
2221 } = useCurrentOrganization ( ) ;
2322 const { setCurrentHomePage } = useHomePageContext ( ) ;
2423
25- const {
26- data : applyInterestImageUrl ,
27- isLoading : applyImageLoading ,
28- isError : applyImageIsError ,
29- error : applyImageError
30- } = useGetImageUrl ( organization ?. applyInterestImageId ?? null ) ;
31- const {
32- data : exploreGuestImageUrl ,
33- isLoading : exploreImageLoading ,
34- isError : exploreImageIsError ,
35- error : exploreImageError
36- } = useGetImageUrl ( organization ?. exploreAsGuestImageId ?? null ) ;
24+ // const {
25+ // data: applyInterestImageUrl,
26+ // isLoading: applyImageLoading,
27+ // isError: applyImageIsError,
28+ // error: applyImageError
29+ // } = useGetImageUrl(organization?.applyInterestImageId ?? null);
30+ // const {
31+ // data: exploreGuestImageUrl,
32+ // isLoading: exploreImageLoading,
33+ // isError: exploreImageIsError,
34+ // error: exploreImageError
35+ // } = useGetImageUrl(organization?.exploreAsGuestImageId ?? null);
3736
3837 useEffect ( ( ) => {
3938 setCurrentHomePage ( 'guest' ) ;
4039 } , [ setCurrentHomePage ] ) ;
4140
42- if ( organizationIsError ) {
43- return < ErrorPage message = { organizationError . message } /> ;
44- }
45- if ( applyImageIsError ) return < ErrorPage message = { applyImageError . message } /> ;
46- if ( exploreImageIsError ) return < ErrorPage message = { exploreImageError . message } /> ;
41+ // if (organizationIsError) {
42+ // return <ErrorPage message={organizationError.message} />;
43+ // }
44+ // if (applyImageIsError) return <ErrorPage message={applyImageError.message} />;
45+ // if (exploreImageIsError) return <ErrorPage message={exploreImageError.message} />;
4746
48- if ( ! organization || organizationIsLoading || applyImageLoading || exploreImageLoading ) return < LoadingIndicator /> ;
49- if ( ! applyInterestImageUrl || ! exploreGuestImageUrl ) return < LoadingIndicator /> ;
47+ // if (!organization || organizationIsLoading || applyImageLoading || exploreImageLoading) return <LoadingIndicator />;
48+ // if (!applyInterestImageUrl || !exploreGuestImageUrl) return <LoadingIndicator />;
5049
5150 return (
5251 < PageLayout title = "Home" hidePageTitle >
@@ -60,22 +59,15 @@ const IntroGuestHomePage = () => {
6059 alignItems : 'center' ,
6160 flexDirection : { xs : 'column' , md : 'row' } ,
6261 mt : 4 ,
63- padding : '20px'
62+ padding : '20px' ,
63+ px : { xs : 1 , sm : 2 } ,
64+ width : '100%' ,
65+ boxSizing : 'border-box' ,
66+ overflow : 'hidden'
6467 } }
6568 >
66- < Box sx = { { display : 'flex' , gap : 5 } } >
67- < ImageWithButton
68- title = "Interested in applying"
69- imageSrc = { applyInterestImageUrl }
70- buttonText = "Learn More"
71- onClick = { ( ) => history . push ( routes . HOME_PNM ) }
72- />
73- < ImageWithButton
74- title = "Explore Our Work as a Guest"
75- imageSrc = { exploreGuestImageUrl }
76- buttonText = "FinishLine"
77- onClick = { ( ) => history . push ( routes . HOME_MEMBER ) }
78- />
69+ < Box sx = { { width : '100%' , minWidth : 0 } } >
70+ < FeaturedProjects />
7971 </ Box >
8072 </ Box >
8173 </ PageLayout >
0 commit comments