|
| 1 | +import Container from '@mui/material/Container' |
| 2 | +import Grid from '@mui/material/Grid' |
| 3 | +import Typography from '@mui/material/Typography' |
| 4 | +import SubContentText from '@/components/common/layout/subtcontenttext' |
| 5 | +import DonutChart from '@/components/common/ui/charts/donut' |
| 6 | +import BarChart from '@/components/common/ui/charts/bar' |
| 7 | +import LineGraph from '@/components/common/ui/charts/line' |
| 8 | +import ArticleText from '@/components/common/layout/articletext' |
| 9 | +import CountryList from '@/domain/profile/countrylist' |
| 10 | +import styles from './styles' |
| 11 | + |
| 12 | +function ProfileCenteredComponent ({ |
| 13 | + country, |
| 14 | + countries, |
| 15 | + textData, |
| 16 | + donutData, |
| 17 | + barData, |
| 18 | + handleSelectCountry |
| 19 | +}) { |
| 20 | + return ( |
| 21 | + <Container maxWidth='lg'> |
| 22 | + <Grid container sx={styles.container}> |
| 23 | + <Grid item xs={12} sx={{ marginBottom: '48px' }}> |
| 24 | + <Typography variant="h3"> |
| 25 | + Climate Profile |
| 26 | + {country !== '' && ` - ${country}`} |
| 27 | + </Typography> |
| 28 | + |
| 29 | + <CountryList |
| 30 | + countries={countries} |
| 31 | + handleSelectCountry={handleSelectCountry} |
| 32 | + /> |
| 33 | + </Grid> |
| 34 | + |
| 35 | + {/** Greehouse Gas (GHG) Emmissions Section */} |
| 36 | + <Grid item xs={12} sm={5}> |
| 37 | + <DonutChart {...donutData} /> |
| 38 | + </Grid> |
| 39 | + |
| 40 | + <Grid item xs={12} sm={7}> |
| 41 | + <SubContentText {...textData[0]} /> |
| 42 | + </Grid> |
| 43 | + |
| 44 | + {/** Climate Risks Section */} |
| 45 | + <Grid item xs={12}> |
| 46 | + <Typography variant="h4"> |
| 47 | + Climate Change Scenarios |
| 48 | + </Typography> |
| 49 | + </Grid> |
| 50 | + |
| 51 | + <Grid item xs={12} sm={7}> |
| 52 | + <SubContentText |
| 53 | + {...textData[0]} |
| 54 | + title='Climate Risks' |
| 55 | + /> |
| 56 | + </Grid> |
| 57 | + |
| 58 | + <Grid item xs={12} sm={5}> |
| 59 | + <BarChart |
| 60 | + {...barData} |
| 61 | + /> |
| 62 | + </Grid> |
| 63 | + |
| 64 | + {/** Climate Change Scenarios Section */} |
| 65 | + <Grid item xs={12} sm={7}> |
| 66 | + <SubContentText |
| 67 | + {...textData[0]} |
| 68 | + title='Climate Change and Vulnerability' |
| 69 | + /> |
| 70 | + </Grid> |
| 71 | + |
| 72 | + <Grid item xs={12} sm={5}> |
| 73 | + <LineGraph |
| 74 | + {...barData} |
| 75 | + /> |
| 76 | + </Grid> |
| 77 | + |
| 78 | + {/** Other Lengthy Text Section */} |
| 79 | + {textData.map((item, index) => { |
| 80 | + if (index >= 1) { |
| 81 | + return <Grid item xs={12} key={index}> |
| 82 | + <ArticleText {...item} /> |
| 83 | + </Grid> |
| 84 | + } |
| 85 | + })} |
| 86 | + </Grid> |
| 87 | + </Container> |
| 88 | + ) |
| 89 | +} |
| 90 | + |
| 91 | +export default ProfileCenteredComponent |
0 commit comments