Skip to content

Commit 68603f1

Browse files
committed
Merge branch 'mariano/comp-229-dub-affiliates' of github.com:trycompai/comp into mariano/comp-229-dub-affiliates
2 parents 19fb0b9 + fb219f2 commit 68603f1

File tree

7 files changed

+61
-32
lines changed

7 files changed

+61
-32
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,5 @@ jobs:
4343
GITHUB_TOKEN: ${{ secrets.GH_TOKEN || secrets.GITHUB_TOKEN }}
4444
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }} # Uncomment if publishing to npm
4545
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
46+
HUSKY: 0 # Skip husky hooks in CI
4647
run: npx semantic-release

apps/app/src/app/(app)/setup/components/AnimatedGradientBackgroundWrapper.tsx

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,6 @@ export function AnimatedGradientBackgroundWrapper() {
77
const [scale, setScale] = useState(0.7);
88

99
useEffect(() => {
10-
// Function to calculate scale from localStorage
11-
const updateScale = () => {
12-
if (typeof window !== 'undefined') {
13-
const stepIndex = parseInt(localStorage.getItem('onboarding-step-index') || '0');
14-
const totalSteps = parseInt(localStorage.getItem('onboarding-total-steps') || '9');
15-
16-
// Calculate scale based on step progress (0.7 to 1.5)
17-
const progressScale = 0.7 + (stepIndex / (totalSteps - 1)) * 0.8;
18-
setScale(progressScale);
19-
}
20-
};
21-
22-
// Initial load
23-
updateScale();
24-
2510
// Listen for step changes
2611
const handleStepChange = (event: Event) => {
2712
const customEvent = event as CustomEvent;

apps/app/src/app/(app)/setup/components/OrganizationSetupForm.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,23 +62,18 @@ export function OrganizationSetupForm({
6262

6363
const hasExistingOrgs = existingOrganizations.length > 0;
6464

65-
// Save step progress to localStorage
65+
// Dispatch custom event for background animation when step changes
6666
useEffect(() => {
6767
if (typeof window !== 'undefined') {
6868
if (isFinalizing) {
6969
// Set to max scale when finalizing
70-
localStorage.setItem('onboarding-progress', '1');
7170
window.dispatchEvent(
7271
new CustomEvent('onboarding-step-change', {
7372
detail: { stepIndex: steps.length - 1, totalSteps: steps.length, progress: 1 },
7473
}),
7574
);
7675
} else {
7776
const progress = stepIndex / (steps.length - 1);
78-
localStorage.setItem('onboarding-step-index', stepIndex.toString());
79-
localStorage.setItem('onboarding-total-steps', steps.length.toString());
80-
localStorage.setItem('onboarding-progress', progress.toString());
81-
8277
// Dispatch custom event to notify the background wrapper
8378
window.dispatchEvent(
8479
new CustomEvent('onboarding-step-change', {

apps/app/src/app/(app)/setup/hooks/useOnboardingForm.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@ import { z } from 'zod';
1111
import { createOrganization } from '../actions/create-organization';
1212
import { createOrganizationMinimal } from '../actions/create-organization-minimal';
1313
import type { OnboardingFormFields } from '../components/OnboardingStepInput';
14-
import { STORAGE_KEY, companyDetailsSchema, steps } from '../lib/constants';
14+
import { companyDetailsSchema, steps } from '../lib/constants';
1515
import { updateSetupSession } from '../lib/setup-session';
1616
import type { CompanyDetails } from '../lib/types';
17-
import { useLocalStorage } from './useLocalStorage';
1817

1918
interface UseOnboardingFormProps {
2019
setupId?: string;
@@ -29,9 +28,8 @@ export function useOnboardingForm({
2928
}: UseOnboardingFormProps = {}) {
3029
const router = useRouter();
3130

32-
// If we have a setupId, use the initialData from KV, otherwise use localStorage
33-
const [savedAnswers, setSavedAnswers] = useLocalStorage<Partial<CompanyDetails>>(
34-
STORAGE_KEY,
31+
// Use state instead of localStorage - initialized from KV data if setupId exists
32+
const [savedAnswers, setSavedAnswers] = useState<Partial<CompanyDetails>>(
3533
setupId && initialData ? initialData : {},
3634
);
3735

@@ -108,6 +106,7 @@ export function useOnboardingForm({
108106
// Organization created, now redirect to plans page
109107
router.push(`/upgrade/${data.organizationId}`);
110108

109+
// Clear answers after successful creation
111110
setSavedAnswers({});
112111
} else {
113112
toast.error('Failed to create organization');
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
'use client';
2+
3+
import CalendarEmbed from '@/components/calendar-embed';
4+
import { Button } from '@comp/ui/button';
5+
import {
6+
Dialog,
7+
DialogContent,
8+
DialogDescription,
9+
DialogHeader,
10+
DialogTitle,
11+
DialogTrigger,
12+
} from '@comp/ui/dialog';
13+
import { Phone } from 'lucide-react';
14+
15+
export function BookingDialog() {
16+
return (
17+
<Dialog>
18+
<DialogTrigger asChild>
19+
<Button variant="outline" size="sm" className="w-full">
20+
<Phone className="h-4 w-4" />
21+
Book a Call with Our Team
22+
</Button>
23+
</DialogTrigger>
24+
<DialogContent className="sm:max-w-4xl md:max-w-5xl lg:max-w-6xl w-[95vw] h-[70vh] p-0 overflow-y-auto">
25+
<div className="flex flex-col h-full">
26+
<DialogHeader className="px-8 py-6 border-b">
27+
<DialogTitle className="text-xl font-semibold">
28+
Schedule a Call with Our Compliance Experts
29+
</DialogTitle>
30+
<DialogDescription className="mt-2">
31+
Have questions about our plans? Want to learn how we can help you achieve compliance
32+
in 14 days? Book a call with our team.
33+
</DialogDescription>
34+
</DialogHeader>
35+
<div className="flex-1 mx-auto w-full">
36+
<CalendarEmbed />
37+
</div>
38+
</div>
39+
</DialogContent>
40+
</Dialog>
41+
);
42+
}

apps/app/src/app/(app)/upgrade/[orgId]/pricing-cards.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { useAction } from 'next-safe-action/hooks';
1919
import { useRouter } from 'next/navigation';
2020
import { useState } from 'react';
2121
import { toast } from 'sonner';
22+
import { BookingDialog } from './components/BookingDialog';
2223

2324
interface PricingCardsProps {
2425
organizationId: string;
@@ -196,6 +197,7 @@ const paidFeatures = [
196197
'Dedicated Success Team',
197198
'24x7x365 Support & SLA',
198199
'Slack Channel with Comp AI',
200+
'12-month minimum term',
199201
];
200202

201203
export function PricingCards({ organizationId, priceDetails }: PricingCardsProps) {
@@ -446,6 +448,16 @@ export function PricingCards({ organizationId, priceDetails }: PricingCardsProps
446448
<ReviewSection rating={4.7} reviewCount={100} />
447449
</div>
448450
</Card>
451+
452+
{/* Help Section */}
453+
<Card className="bg-muted/30 border-dashed">
454+
<CardContent className="p-4">
455+
<p className="text-xs text-muted-foreground text-center mb-3">
456+
Have questions? We're here to help
457+
</p>
458+
<BookingDialog />
459+
</CardContent>
460+
</Card>
449461
</div>
450462
</div>
451463
</div>

apps/app/src/components/calendar-embed.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ export default function CalendarEmbed() {
1212
}, []);
1313

1414
return (
15-
<Cal
16-
namespace="meet-us"
17-
calLink="team/compai/meet-us"
18-
style={{ width: '100%', height: '100%', overflow: 'scroll' }}
19-
config={{ layout: 'month_view' }}
20-
/>
15+
<Cal namespace="meet-us" calLink="team/compai/meet-us" config={{ layout: 'month_view' }} />
2116
);
2217
}

0 commit comments

Comments
 (0)