上限値、下限値の制御

  const handleBadgePlus = () => {
    setBadgeCount((prev) => Math.min(prev + 1, 5));
  }
  const handleBadgeMinus = () => {
    setBadgeCount((prev) => Math.max(prev - 1, 0));
  }