Skip to content

Commit 334d451

Browse files
committed
Update Zapier theme to dark and improve email prop handling
1 parent 6d11c3b commit 334d451

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

apps/web/components/marketing/features.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export default function Features() {
135135
<div className="mx-auto mt-16 max-w-7xl px-6 sm:mt-20 md:mt-24 lg:px-8">
136136
<zapier-workflow
137137
client-id="rnKv828fHE7sPhcZdGhwqWbIsJkOfhUEh2RAHQw4"
138-
theme="auto"
138+
theme="dark"
139139
intro-copy-display="show"
140140
guess-zap-display="show"
141141
zap-create-from-scratch-display="show"

apps/web/pages/integrations/zapier.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ export async function getServerSideProps(ctx: GetServerSidePropsContext) {
99
const { user } = await getSupabaseServerClient(ctx);
1010

1111
return {
12-
props: { email: user.email },
12+
props: { email: user?.email },
1313
};
1414
}
1515

16-
export default function Zapier({ email }: { email: string }) {
16+
export default function Zapier({ email }: { email?: string }) {
1717
return (
1818
<div className="h-full bg-gray-100 dark:bg-gray-800">
1919
<HeaderComponent />

apps/web/utils/useDatabase.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,13 @@ export const getUserById = async (user_id: string): Promise<IUser> => {
2020

2121
return {
2222
...user,
23-
has_active_subscription: user.pro_gifted ? true : ["trialing", "active"].includes(
24-
(user?.stripe_subscription as unknown as Stripe.Subscription)?.status
25-
),
23+
has_active_subscription:
24+
user.pro_gifted === true
25+
? true
26+
: ["trialing", "active"].includes(
27+
(user?.stripe_subscription as unknown as Stripe.Subscription)
28+
?.status
29+
),
2630
} as unknown as IUser;
2731
};
2832

0 commit comments

Comments
 (0)