Skip to content

Commit

Permalink
feat : no menu, error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
hoyyChoi committed Sep 1, 2023
1 parent 7d35d3e commit e98d3b6
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions source/component/EachShop.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,18 @@ const EachShop = ({data, key, isEnd}) => {
<Text>
"menu" : {'['}
<Newline />
{data.menu.map((item, index, array) => (
<Text key={index}>
{' '}
{'{'} "{item.menuName}" : {item.menuPrice} {'}'}
{index !== array.length - 1 ? ',' : ''}
<Newline />
</Text>
))}
{data.menu ? (
data.menu.map((item, index, array) => (
<Text key={index}>
{' '}
{'{'} "{item.menuName}" : {item.menuPrice} {'}'}
{index !== array.length - 1 ? ',' : ''}
<Newline />
</Text>
))
) : (
<Text>메뉴가 없습니다.</Text>
)}
{']'},
<Newline />
</Text>
Expand Down

0 comments on commit e98d3b6

Please sign in to comment.