Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore : add error messege when no food in image #84

Merged
merged 2 commits into from
Sep 17, 2024

Conversation

rarandeyo
Copy link
Collaborator

image

Copy link
Owner

@mst-mkt mst-mkt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

こうすればstate増やさなくていいかも

const noFoodsError = useMemo(
  () => foodImages.some(({foods}) => foods.length === 0),
  [foodImages]
)

// 省略

{noFoodsError && (
  <div className="flex gap-x-2">
    <IconAlertCircle size={25} className="text-red-400" />
    <p>画像から食材が見つかりませんでした</p>
  </div>
)}

Copy link

cloudflare-workers-and-pages bot commented Sep 17, 2024

Deploying chefcam with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1250d76
Status: ✅  Deploy successful!
Preview URL: https://0b72f49a.chefcam.pages.dev
Branch Preview URL: https://chore-add-error-messege.chefcam.pages.dev

View logs

@mst-mkt mst-mkt merged commit 63b2cff into main Sep 17, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants