AddressItem.jsx 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. import {Grid} from "@mui/material";
  2. import Typography from "@mui/material/Typography";
  3. import Social from "../../components/SocialLink";
  4. import * as React from "react";
  5. export const AddressItem = ({item}) => {
  6. return (
  7. <>
  8. <Grid padding='50px 40px !important' item xs={12} md={6}>
  9. <Typography
  10. variant="h5"
  11. letterSpacing="2px"
  12. marginBottom='40px'
  13. >
  14. {item[0].toString() || 'no name'}
  15. </Typography>
  16. <Grid color="#616161" container spacing={2}>
  17. <Grid marginBottom='30px' item xs={12} sm={6}>
  18. <Typography
  19. fontSize='13px'
  20. fontWeight='300'
  21. marginBottom='15px'
  22. >
  23. PHONES
  24. </Typography>
  25. {Array.isArray(item) && item.length > 0 && item[1]?.phones.map((i, index) =>
  26. <Typography
  27. key={index}
  28. lineHeight='1.7em'
  29. fontWeight='400'
  30. variant="body1"
  31. >
  32. {i.toString() || 'phones'}
  33. </Typography>
  34. )}
  35. </Grid>
  36. <Grid marginBottom='30px' item xs={12} sm={6}>
  37. <Typography
  38. fontSize='13px'
  39. fontWeight='300'
  40. marginBottom='15px'
  41. >
  42. ADDRESS
  43. </Typography>
  44. <Typography
  45. lineHeight='1.7em'
  46. fontWeight='400'
  47. variant='body1'
  48. >
  49. {Array.isArray(item) && item.length > 0 ? item[1]?.address : 'address'}
  50. </Typography>
  51. </Grid>
  52. <Grid marginBottom='30px' item xs={12} sm={6}>
  53. <Typography
  54. fontSize='13px'
  55. fontWeight='300'
  56. marginBottom='15px'
  57. >
  58. EMAIL
  59. </Typography>
  60. {Array.isArray(item) && item.length > 0 &&item[1]?.email.map(i =>
  61. <Typography
  62. key={i.toString()}
  63. lineHeight='1.7em'
  64. fontWeight='400'
  65. variant="body1"
  66. >
  67. { i.toString() || 'email' }
  68. </Typography>)
  69. }
  70. </Grid>
  71. <Grid marginBottom='30px' item xs={12} sm={6}>
  72. <Typography
  73. fontSize='13px'
  74. fontWeight='300'
  75. marginBottom='15px'
  76. >
  77. SOCIAL NETWORKS
  78. </Typography>
  79. {(item[1]["social networks"] || []).map(item =>
  80. <Social key={item.url} Icon={item.icon} link={item.url}/>
  81. )}
  82. </Grid>
  83. </Grid>
  84. </Grid>
  85. </>
  86. )
  87. }