mirror of
https://github.com/formbricks/formbricks.git
synced 2026-02-26 10:19:14 -06:00
Remove responses limit for link surveys on free plan (#686)
This commit is contained in:
@@ -51,7 +51,8 @@ export default function PricingTable({ environmentId, session }: PricingTablePro
|
||||
"Unlimited surveys",
|
||||
"Unlimited team members",
|
||||
"Remove branding",
|
||||
"100 responses per survey",
|
||||
"Unlimited link survey responses",
|
||||
"100 responses per web-app survey",
|
||||
"Granular targeting",
|
||||
"In-product surveys",
|
||||
"Link surveys",
|
||||
|
||||
@@ -13,7 +13,10 @@ export const getAnalysisData = async (surveyId: string, environmentId: string) =
|
||||
if (!team) throw new Error(`Team not found for environment: ${environmentId}`);
|
||||
if (survey.environmentId !== environmentId) throw new Error(`Survey not found: ${surveyId}`);
|
||||
const limitReached =
|
||||
IS_FORMBRICKS_CLOUD && team.plan === "free" && allResponses.length >= RESPONSES_LIMIT_FREE;
|
||||
IS_FORMBRICKS_CLOUD &&
|
||||
team.plan === "free" &&
|
||||
survey.type === "web" &&
|
||||
allResponses.length >= RESPONSES_LIMIT_FREE;
|
||||
const responses = limitReached ? allResponses.slice(0, RESPONSES_LIMIT_FREE) : allResponses;
|
||||
const responsesCount = allResponses.length;
|
||||
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
import Script from "next/script";
|
||||
|
||||
declare global {
|
||||
namespace JSX {
|
||||
interface IntrinsicElements {
|
||||
["stripe-pricing-table"]: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default function BillingPage({ organisationId }: { organisationId: string }) {
|
||||
if (!process.env.NEXT_PUBLIC_STRIPE_PRICING_TABLE_ID || !process.env.NEXT_PUBLIC_STRIPE_PUBLIC_KEY) {
|
||||
return <div>Stripe environment variables not set</div>;
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<Script async src="https://js.stripe.com/v3/pricing-table.js" />
|
||||
<stripe-pricing-table
|
||||
pricing-table-id={process.env.NEXT_PUBLIC_STRIPE_PRICING_TABLE_ID}
|
||||
publishable-key={process.env.NEXT_PUBLIC_STRIPE_PUBLIC_KEY}
|
||||
client-reference-id={organisationId}></stripe-pricing-table>
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user