mercari-build / mercari-build-training

24 stars 225 forks source link

[step7] fix setItems() properties #205

Closed NamikoToriyama closed 8 months ago

NamikoToriyama commented 8 months ago

What

Fixed to display screen by npm start

Currently, if we just run npm start, nothing is displayed on the screen.

GET success: 
Array(3)
0
{ID: 1, name: 'name', category: 'category', imageFileName: 'image_url'}
1
{ID: 2, name: 'shoes', category: 'mercari', imageFileName: 'edcd3ab5ced7c63e3fc6e10be59452ee6feab674630de3eff3c510bce28f4bff'}
2 
{ID: 3, name: 'super shoes', category: 'mercari', imageFileName: 'edcd3ab5ced7c63e3fc6e10be59452ee6feab674630de3eff3c510bce28f4bff'}
length 3
[[Prototype]]
Array(0)
screenshot_2024-02-26_at_14 04 36

CHECKS :warning:

Please make sure you are aware of the following.

bygonexf commented 8 months ago

The example response in doc step 4 is {"items": [{"name": "jacket", "category": "fashion", "image_name": "510824dfd4caed183a7a7cc2be80f24a5f5048e15b3b5338556d5bbd3f7bc267.jpg"}, ...]}, so setItems(data.items); is consistent with it. However, there truly is a problem that the example response does not include id informationšŸ¤”. Maybe either doc step 4 or code step 7 should be modified to reach consistency.