|
1 | | -import { InboxIcon, SparklesIcon } from "@heroicons/react/outline"; |
2 | | -import Image from "next/image"; |
| 1 | +import { GetServerSidePropsContext } from "next"; |
| 2 | +import Head from "next/head"; |
3 | 3 | import FooterComponent from "../../components/layout/footer.component"; |
4 | 4 | import HeaderComponent from "../../components/layout/header.component"; |
5 | 5 | import Page from "../../components/layout/page.component"; |
6 | | -import zapierGitHub from "../../public/images/zapier/github.png"; |
7 | | -import zapierTweet from "../../public/images/zapier/tweet.png"; |
| 6 | +import { getSupabaseServerClient } from "../../utils/supabase/supabase-admin"; |
8 | 7 |
|
9 | | -export default function Example() { |
| 8 | +export async function getServerSideProps(ctx: GetServerSidePropsContext) { |
| 9 | + const { user } = await getSupabaseServerClient(ctx); |
| 10 | + |
| 11 | + return { |
| 12 | + props: { email: user?.email }, |
| 13 | + }; |
| 14 | +} |
| 15 | + |
| 16 | +export default function Zapier({ email }: { email?: string }) { |
10 | 17 | return ( |
11 | 18 | <div className="h-full bg-gray-100 dark:bg-gray-800"> |
12 | 19 | <HeaderComponent /> |
| 20 | + <Head> |
| 21 | + <script |
| 22 | + type="module" |
| 23 | + src="https://cdn.zapier.com/packages/partner-sdk/v0/zapier-elements/zapier-elements.esm.js" |
| 24 | + ></script> |
| 25 | + </Head> |
13 | 26 |
|
14 | | - <Page title="Zapier Integration" fullWidth> |
15 | | - <div className="relative pt-16 pb-32 overflow-hidden"> |
| 27 | + <Page title="Automate using Zapier"> |
| 28 | + <div className="relative pb-32 overflow-hidden"> |
16 | 29 | <div className="relative"> |
17 | | - <div className="lg:mx-auto lg:max-w-7xl text-center"> |
18 | | - <div className="px-4 max-w-xl mx-auto sm:px-6 lg:py-4 pb-8 lg:pb-16 lg:max-w-none lg:mx-0 lg:px-0"> |
19 | | - <h2 className="text-3xl font-extrabold tracking-tight text-gray-900 dark:text-gray-50"> |
20 | | - Connect with Zapier and{" "} |
21 | | - <span className="text-indigo-600 dark:text-indigo-500"> |
22 | | - automate your workflow |
23 | | - </span> |
24 | | - , here are some examples: |
25 | | - </h2> |
26 | | - </div> |
27 | | - </div> |
28 | | - |
29 | | - <div className="lg:mx-auto lg:max-w-7xl lg:px-8 lg:grid lg:grid-cols-2 lg:grid-flow-col-dense lg:gap-24"> |
30 | | - <div className="px-4 max-w-xl mx-auto sm:px-6 lg:py-16 lg:max-w-none lg:mx-0 lg:px-0"> |
31 | | - <div> |
32 | | - <div className="hidden lg:block"> |
33 | | - <span className="h-12 w-12 rounded-md flex items-center justify-center bg-indigo-600"> |
34 | | - <InboxIcon |
35 | | - className="h-6 w-6 text-white" |
36 | | - aria-hidden="true" |
37 | | - /> |
38 | | - </span> |
39 | | - </div> |
40 | | - <div className="mt-6"> |
41 | | - <h2 className="text-3xl font-extrabold tracking-tight text-gray-900 dark:text-gray-50"> |
42 | | - Tweet when you create a post |
43 | | - </h2> |
44 | | - <p className="mt-4 text-lg text-gray-500 dark:text-gray-400"> |
45 | | - Share your new posts on Twitter so that customers are in |
46 | | - the loop with latest changes in your product. |
47 | | - </p> |
48 | | - <div className="mt-6"> |
49 | | - <a |
50 | | - href="https://zapier.com/developer/public-invite/156052/c952eac2cc1df107ce2c1ff82feddc19/" |
51 | | - target="_blank" |
52 | | - rel="noopener noreferrer" |
53 | | - className="inline-flex px-4 py-2 border border-transparent text-base font-medium rounded-md shadow-sm text-white bg-indigo-600 hover:bg-indigo-700" |
54 | | - > |
55 | | - Get started |
56 | | - </a> |
57 | | - </div> |
58 | | - </div> |
59 | | - </div> |
60 | | - </div> |
61 | | - <div className="mt-12 sm:mt-16 lg:mt-0"> |
62 | | - <div className="pl-4 -mr-48 sm:pl-6 md:-mr-16 lg:px-0 lg:m-0 lg:relative lg:h-full"> |
63 | | - <Image |
64 | | - className="w-full rounded-xl shadow-xl ring-1 ring-black ring-opacity-5 lg:absolute lg:left-0 lg:h-full lg:w-auto lg:max-w-none" |
65 | | - src={zapierTweet.src} |
66 | | - alt="Post to Tweet" |
67 | | - width={667} |
68 | | - height={374} |
69 | | - /> |
70 | | - </div> |
71 | | - </div> |
72 | | - </div> |
73 | | - </div> |
74 | | - <div className="mt-24"> |
75 | | - <div className="lg:mx-auto lg:max-w-7xl lg:px-8 lg:grid lg:grid-cols-2 lg:grid-flow-col-dense lg:gap-24"> |
76 | | - <div className="px-4 max-w-xl mx-auto sm:px-6 lg:py-32 lg:max-w-none lg:mx-0 lg:px-0 lg:col-start-2"> |
77 | | - <div className="hidden lg:block"> |
78 | | - <span className="h-12 w-12 rounded-md flex items-center justify-center bg-indigo-600"> |
79 | | - <SparklesIcon |
80 | | - className="h-6 w-6 text-white" |
81 | | - aria-hidden="true" |
82 | | - /> |
83 | | - </span> |
84 | | - </div> |
85 | | - <div className="mt-6"> |
86 | | - <h2 className="text-3xl font-extrabold tracking-tight text-gray-900 dark:text-gray-50"> |
87 | | - Sync GitHub releases |
88 | | - </h2> |
89 | | - <p className="mt-4 text-lg text-gray-500 dark:text-gray-400"> |
90 | | - Automatically create a new post in your changes page every |
91 | | - time you publish a new release in GitHub. |
92 | | - </p> |
93 | | - <div className="mt-6"> |
94 | | - <a |
95 | | - href="https://zapier.com/developer/public-invite/156052/c952eac2cc1df107ce2c1ff82feddc19/" |
96 | | - target="_blank" |
97 | | - rel="noopener noreferrer" |
98 | | - className="inline-flex px-4 py-2 border border-transparent text-base font-medium rounded-md shadow-sm text-white bg-indigo-600 hover:bg-indigo-700" |
99 | | - > |
100 | | - Get started |
101 | | - </a> |
102 | | - </div> |
103 | | - </div> |
104 | | - </div> |
105 | | - <div className="mt-12 sm:mt-16 lg:mt-0 lg:col-start-1"> |
106 | | - <div className="pr-4 -ml-48 sm:pr-6 md:-ml-16 lg:px-0 lg:m-0 lg:relative lg:h-full"> |
107 | | - <Image |
108 | | - className="w-full rounded-xl shadow-xl ring-1 ring-black ring-opacity-5 lg:absolute lg:right-0 lg:h-full lg:w-auto lg:max-w-none" |
109 | | - src={zapierGitHub.src} |
110 | | - alt="Copy releases from GitHub" |
111 | | - width={892} |
112 | | - height={502} |
113 | | - /> |
114 | | - </div> |
115 | | - </div> |
116 | | - </div> |
117 | | - </div> |
118 | | - |
119 | | - <div className="lg:mx-auto lg:max-w-7xl text-center mt-24"> |
120 | | - <div className="px-4 max-w-xl mx-auto sm:px-6 py-8 lg:py-16 lg:max-w-none lg:mx-0 lg:px-0"> |
121 | | - <p className="text-xl text-gray-900 dark:text-gray-50"> |
122 | | - Zapier lets you connect changes.page with thousands of the most |
123 | | - popular apps, so you can automate your work and have more time |
124 | | - for what matters most—no code required. |
125 | | - </p> |
| 30 | + <div className="lg:mx-auto lg:max-w-7xl text-center mx-4 md:mx-0"> |
| 31 | + <zapier-workflow |
| 32 | + sign-up-email={email} |
| 33 | + client-id="rnKv828fHE7sPhcZdGhwqWbIsJkOfhUEh2RAHQw4" |
| 34 | + theme="auto" |
| 35 | + intro-copy-display="show" |
| 36 | + guess-zap-display="show" |
| 37 | + zap-create-from-scratch-display="show" |
| 38 | + /> |
126 | 39 | </div> |
127 | 40 | </div> |
128 | 41 | </div> |
|
0 commit comments