Skip to content

Commit

Permalink
fix free subs cannot create new post
Browse files Browse the repository at this point in the history
  • Loading branch information
iamtouha committed Feb 12, 2024
1 parent 0d52be9 commit 0ab74de
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/(main)/dashboard/_components/posts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ export const Posts = ({ posts, subscriptionPlan }: PostsProps) => {
return (
<div className="grid gap-4 md:grid-cols-2 lg:grid-cols-3">
<NewPost
isEligible={subscriptionPlan?.isPro ?? optimisticPosts.length < 3}
isEligible={
(optimisticPosts.length < 3 || subscriptionPlan?.isPro) ?? false
}
setOptimisticPosts={setOptimisticPosts}
/>
{optimisticPosts.map((post) => (
Expand Down

0 comments on commit 0ab74de

Please sign in to comment.