Move next js project to archive (#207)

This commit is contained in:
Aaron Po
2026-04-20 02:30:25 -04:00
committed by GitHub
parent 92ec16ce93
commit d47e3ed7f0
347 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
import { FC } from 'react';
import { FaThumbsUp, FaRegThumbsUp } from 'react-icons/fa';
interface LikeButtonProps {
isLiked: boolean;
handleLike: () => Promise<void>;
loading: boolean;
}
const LikeButton: FC<LikeButtonProps> = ({ isLiked, handleLike, loading }) => {
return (
<button
type="button"
className={`btn btn-sm gap-2 rounded-2xl lg:btn-md ${
!isLiked ? 'btn-ghost outline' : 'btn-primary'
}`}
onClick={() => {
handleLike();
}}
disabled={loading}
>
{isLiked ? (
<>
<FaThumbsUp className="lg:text-2xl" />
Liked
</>
) : (
<>
<FaRegThumbsUp className="lg:text-2xl" />
Like
</>
)}
</button>
);
};
export default LikeButton;