Skip to content

Commit 9e0506e

Browse files
fix(app): remove Demo button on booking-step page (#1822)
Co-authored-by: chasprowebdev <[email protected]>
1 parent 29054d5 commit 9e0506e

File tree

2 files changed

+9
-58
lines changed

2 files changed

+9
-58
lines changed

apps/app/src/app/(app)/upgrade/[orgId]/components/booking-step.tsx

Lines changed: 8 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,37 @@
11
'use client';
22

3-
import { useState } from 'react';
4-
import { ArrowRight, Check, Copy } from 'lucide-react';
5-
import { toast } from 'sonner';
6-
import Link from 'next/link';
73
import { Button } from '@comp/ui/button';
84
import { Card } from '@comp/ui/card';
95
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@comp/ui/tooltip';
6+
import { Check, Copy } from 'lucide-react';
7+
import { useState } from 'react';
8+
import { toast } from 'sonner';
109

1110
export function BookingStep({
12-
email,
13-
name,
1411
company,
1512
orgId,
16-
complianceFrameworks,
1713
hasAccess,
1814
}: {
19-
email: string;
20-
name: string;
2115
company: string;
2216
orgId: string;
23-
complianceFrameworks: string[];
2417
hasAccess: boolean;
2518
}) {
2619
const [isCopied, setIsCopied] = useState(false);
2720

2821
const title = !hasAccess ? `Let's get ${company} approved` : 'Talk to us to upgrade';
2922

3023
const description = !hasAccess
31-
? `A quick 20-minute call with our team to understand your compliance needs and approve your organization for access.`
24+
? `Please copy and share the Org ID below in your with your Customer Success Rep in Slack`
3225
: `A quick 20-minute call with our team to understand your compliance needs and upgrade your plan.`;
3326

34-
const cta = !hasAccess ? 'Book Your Demo' : 'Book a Call';
35-
3627
const handleCopyOrgId = async () => {
3728
if (isCopied) return;
38-
29+
3930
try {
4031
await navigator.clipboard.writeText(orgId);
4132
setIsCopied(true);
4233
toast.success('Org ID copied to clipboard');
43-
34+
4435
// Reset after 3 seconds
4536
setTimeout(() => {
4637
setIsCopied(false);
@@ -74,7 +65,7 @@ export function BookingStep({
7465
variant="outline"
7566
className="text-xs rounded-tl-none rounded-bl-none"
7667
onClick={handleCopyOrgId}
77-
aria-label={isCopied ? "Copied!" : "Copy Org ID"}
68+
aria-label={isCopied ? 'Copied!' : 'Copy Org ID'}
7869
>
7970
{isCopied ? (
8071
<Check className="w-4 h-4 text-green-600 dark:text-green-400" />
@@ -84,31 +75,11 @@ export function BookingStep({
8475
</Button>
8576
</TooltipTrigger>
8677
<TooltipContent>
87-
<p className="text-xs">{isCopied ? "Copied!" : "Copy Org ID"}</p>
78+
<p className="text-xs">{isCopied ? 'Copied!' : 'Copy Org ID'}</p>
8879
</TooltipContent>
8980
</Tooltip>
9081
</TooltipProvider>
9182
</div>
92-
93-
{/* CTA Button */}
94-
<div className="flex justify-center">
95-
<Link
96-
href={`https://trycomp.ai/demo?email=${email}&name=${name}&company=${company}&orgId=${orgId}&complianceFrameworks=${complianceFrameworks.join(',')}`}
97-
target="_blank"
98-
rel="noopener noreferrer"
99-
>
100-
<Button size="lg" className="min-w-[200px]">
101-
{cta} <ArrowRight className="w-4 h-4" />
102-
</Button>
103-
</Link>
104-
</div>
105-
106-
{/* Already spoke to us section */}
107-
<div className="border-gray-200 dark:border-gray-800">
108-
<p className="text-center text-sm text-muted-foreground">
109-
Already had a demo? Ask your point of contact to activate your account.
110-
</p>
111-
</div>
11283
</div>
11384
</Card>
11485
</div>

apps/app/src/app/(app)/upgrade/[orgId]/page.tsx

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -51,31 +51,11 @@ export default async function UpgradePage({ params }: PageProps) {
5151
redirect(`/${orgId}`);
5252
}
5353

54-
const frameworkInstances = await db.frameworkInstance.findMany({
55-
where: {
56-
organizationId: orgId,
57-
},
58-
include: {
59-
framework: true,
60-
},
61-
});
62-
63-
const complianceFrameworks = frameworkInstances.map((framework) =>
64-
framework.framework.name.toLowerCase().replaceAll(' ', ''),
65-
);
66-
6754
return (
6855
<>
6956
<UpgradePageTracking />
7057
<div className="mx-auto px-4 max-w-7xl my-auto min-h-[calc(100vh-10rem)] flex items-center justify-center">
71-
<BookingStep
72-
email={authSession.user.email}
73-
name={authSession.user.name}
74-
company={member.organization.name}
75-
orgId={orgId}
76-
complianceFrameworks={complianceFrameworks}
77-
hasAccess={hasAccess}
78-
/>
58+
<BookingStep company={member.organization.name} orgId={orgId} hasAccess={hasAccess} />
7959
</div>
8060
</>
8161
);

0 commit comments

Comments
 (0)