FeedToast.tsx 336 B

12345678910111213141516171819
  1. 'use client';
  2. type Props = {
  3. count: number;
  4. onClick: () => void;
  5. };
  6. export default function FeedToast({ count, onClick }: Props) {
  7. if (count <= 0) {
  8. return null;
  9. }
  10. return (
  11. <button type="button" className="feed__toast" onClick={onClick}>
  12. <span className="feed__toast-dot" />
  13. 새 글 {count}개 보기
  14. </button>
  15. );
  16. }