@@ -2,7 +2,7 @@ import Box from "@mui/material/Box";
22import Stack from "@mui/material/Stack" ;
33import Divider from "@mui/material/Divider" ;
44import Typography from "@mui/material/Typography" ;
5- import { Button } from "@/components/ui/button " ;
5+ import Button from "@mui/material/Button " ;
66import Container from "@mui/material/Container" ;
77import Grid2 from "@mui/material/Unstable_Grid2/Grid2" ;
88import Image , { StaticImageData } from "next/image" ;
@@ -155,15 +155,15 @@ const News: NextPage = () => {
155155 borderRadius : 2 ,
156156 } }
157157 component = "img" src =
158- { newsData [ curr ] . img . src } >
158+ { newsData [ curr ] . img ? .src || "" } >
159159 </ Box >
160160 </ Box >
161161 < Box sx = { { width :"50%" , padding :"10px" } } >
162162 < Box sx = { { maxheight :"80%" , fontSize :"1.3rem" , height : 500 , padding :2 } } > { newsData [ curr ] . text } </ Box >
163163 < Box sx = { { minHeight :"20%" , padding :2 , fontSize :"1.1rem" , display :"flex" } } >
164164 < Box sx = { { minWidth :"70%" } } > </ Box >
165165 < Box sx = { { display :"flex" , alignItems :"center" } } >
166- < Box component = "img" src = { newsData [ curr ] . authImg . src } sx = { { height :40 , width :40 , borderRadius :10 , marginRight :1 } } > </ Box >
166+ < Box component = "img" src = { newsData [ curr ] . authImg ? .src || "" } sx = { { height :40 , width :40 , borderRadius :10 , marginRight :1 } } > </ Box >
167167 < Box > { newsData [ curr ] . authName } </ Box >
168168 </ Box >
169169 </ Box >
0 commit comments