Skip to content

Commit

Permalink
fix it
Browse files Browse the repository at this point in the history
  • Loading branch information
colegottdank committed Sep 19, 2024
1 parent 991aa7c commit 03d6401
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions web/components/templates/prompts/promptsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ const PromptsPage = (props: PromptsPageProps) => {
const hasAccess = useMemo(() => {
return (
org?.currentOrg?.tier === "growth" ||
org?.currentOrg?.tier === "enterprise" ||
(org?.currentOrg?.tier === "pro-20240913" &&
(org?.currentOrg?.stripe_metadata as { addons?: { prompts?: boolean } })
?.addons?.prompts)
Expand Down Expand Up @@ -406,7 +407,7 @@ const chatCompletion = await openai.chat.completions.create(
</div>
)}

{filteredPrompts && hasLimitedAccess ? (
{filteredPrompts && (hasLimitedAccess || hasAccess) ? (
searchParams.get("view") === "card" ? (
<ul className="w-full h-full grid grid-cols-2 xl:grid-cols-4 gap-4">
{filteredPrompts.map((prompt, i) => (
Expand Down Expand Up @@ -520,7 +521,7 @@ const chatCompletion = await openai.chat.completions.create(
}}
/>
)
) : hasLimitedAccess ? (
) : hasAccess || hasLimitedAccess ? (
<div className="flex justify-center items-center min-h-[calc(100vh-200px)]">
<Card className="max-w-4xl">
<CardHeader>
Expand Down

0 comments on commit 03d6401

Please sign in to comment.