Refactor: switch data fetching from server side to client

This commit is contained in:
Aaron William Po
2023-05-09 00:53:15 -04:00
parent d9236e8fde
commit 3e1172e440
9 changed files with 188 additions and 61 deletions

View File

@@ -41,7 +41,7 @@ const BreweryCard: FC<{ brewery: z.infer<typeof BreweryPostQueryResult> }> = ({
</div>
<div className="flex justify-between">
{!isLoading && <span>liked by {likeCount} users</span>}
{user && (
{!!user && !isLoading && (
<BreweryPostLikeButton breweryPostId={brewery.id} mutateCount={mutate} />
)}
</div>