refactor: error handling 소스 코드 추가

아직 미완성
This commit is contained in:
yoosangwook 2024-08-21 17:19:32 +09:00
parent 55068138ba
commit 7460409802

View File

@ -19,9 +19,9 @@ export default function RoofSelect() {
useEffect(() => { useEffect(() => {
get({ url: '/api/roof-material/roof-material-infos' }).then((res) => { get({ url: '/api/roof-material/roof-material-infos' }).then((res) => {
if (res.length === 0) { //TODO: error handling
return if (!res) return
}
setRoofMaterials(res) setRoofMaterials(res)
}) })
}, []) }, [])