Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: sentry bug #309

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions packages/backend/src/api/v1/template-versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,14 @@ versions.get("/latest", async (ctx: Context) => {
}

latestVersion.extra = unCamelObject(latestVersion.extra)
latestVersion.content = latestVersion.content?.map((c: any) =>
unCamelObject(c),
)

// This makes sure OpenAI messages are not camel cased as used in the app
// For example: message.toolCallId instead of message.tool_call_id
if (typeof latestVersion.content !== "string") {
latestVersion.content = latestVersion.content?.map((c: any) =>
unCamelObject(c),
)
}

ctx.body = latestVersion
})
Expand Down
5 changes: 5 additions & 0 deletions packages/frontend/components/layout/Paywall.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ export default function Paywall({
return children
}

// Legacy Unlimited plan has access to all features
if (plan === "team" && org?.plan === "unlimited") {
return children
}

const isEnterpriseFeature = plan === "enterprise"

return (
Expand Down
43 changes: 29 additions & 14 deletions packages/frontend/components/layout/UpgradeModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,16 @@ function RenderPrice({ price, period }) {
)
}

function AcceptedPayments() {
return (
<Group align="center" gap={11}>
<img height={24} src="/assets/google-pay.webp" alt="google pay" />
<img height={24} src="/assets/apple-pay.webp" alt="apple pay" />
<img height={24} src="/assets/accepted-cards.webp" alt="Accepted cards" />
</Group>
)
}

function RenderPlanCard({
planId,
price,
Expand Down Expand Up @@ -401,7 +411,7 @@ export function UpgradePlans({
onClick={() => setShowFeatures(true)}
leftSection={<IconArrowDown size={12} />}
>
Expand features
View Features
</Button>
</Group>
) : (
Expand Down Expand Up @@ -429,31 +439,36 @@ function UpgradeModal({
analytics.track("Upgrade Modal")
}, [])

const { org } = useOrg()

if (!process.env.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY) return null

return (
<Container px={20} py="md" size="lg">
<Stack align="center" ta="center" className="unblockable">
{/* <IconAnalyze color={"#206dce"} size={50} /> */}
<Container px={0} pb="md" size="xl">
{/* <Stack align="center" ta="center" className="unblockable"> */}
{/* <IconAnalyze color={"#206dce"} size={50} /> */}

<Title order={2} fw={700} size={34} ta="center">
{/* <Title order={2} fw={700} size={34} ta="center">
10x your AI's performance
</Title>

<Text size="lg" mt={0} mb="lg" fw={500}>
{`Unlock powerful features to improve your AI's
quality.`}
</Text>
</Stack>
<Divider my="xl" />
</Text> */}
{/* </Stack> */}
{/* <Divider my="xl" /> */}
<UpgradePlans highlight={innerProps?.highlight} defaultExpand />
<Text ta="center" size="sm" mt="lg">
Cancel any time with just 1 click. <Mark>30 days</Mark> money-back
guarantee.
<Text ta="center" size="md" mt="lg">
<Mark>30 days</Mark> money-back guarantee. Cancel any time with just 1
click.
</Text>
<Card w="fit-content" mx="auto" mt="md">
<SocialProof />
</Card>
<Group justify="space-between" align="center" w="100%" px="sm" mt="md">
<Card w="fit-content">
<SocialProof />
</Card>
{org?.plan === "free" && <AcceptedPayments />}
</Group>
</Container>
)
}
Expand Down
Binary file not shown.
Binary file added packages/frontend/public/assets/apple-pay.webp
Binary file not shown.
Binary file added packages/frontend/public/assets/google-pay.webp
Binary file not shown.
Loading