File tree Expand file tree Collapse file tree 8 files changed +24
-71
lines changed
website-helper-worker/src Expand file tree Collapse file tree 8 files changed +24
-71
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ export interface Env {
33 CRISP_WEBSITE_ID : string ;
44 NOTION_TOKEN : string ;
55 NOTION_HELTIN_DATABASE_ID : string ;
6- NOTION_CONDUCTOR_DATABASE_ID : string ;
76 NOTION_CONTACT_US_DATABASE_ID : string ;
87 SENTRY_DSN : string ;
98 BEEHIIV_API_KEY : string ;
Original file line number Diff line number Diff line change 11import { Toucan } from 'toucan-js' ;
22import { Client } from '@notionhq/client' ;
3- import { handleConductorContact } from './contact-conductor' ;
43import { handleContactUs } from './contact-guild' ;
54import { handleHeltinContact } from './contact-heltin' ;
65import { buildResponseCorsHeaders } from './cors' ;
@@ -57,15 +56,6 @@ export default {
5756 } ) ;
5857 }
5958
60- if ( request . method === 'POST' && url . pathname === '/api/conductor' ) {
61- return await handleConductorContact ( {
62- request,
63- body : maybeBody ? JSON . parse ( maybeBody ) : null ,
64- notion,
65- notionDatabaseId : env . NOTION_CONDUCTOR_DATABASE_ID ,
66- } ) ;
67- }
68-
6959 if ( request . method === 'POST' && url . pathname === '/api/contact-us' ) {
7060 return await handleContactUs ( {
7161 email : env . EMAIL_SENDER ,
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ export const jsonConfig = {
7979 } ,
8080 '/graphql/shield' : {
8181 redirect : 'https://github.com/maticzav/graphql-shield' ,
82- status : 302
82+ status : 302 ,
8383 } ,
8484 '/graphql/apollo-angular' : {
8585 rewrite : 'apollo-angular.pages.dev' ,
Original file line number Diff line number Diff line change 88 "analyze" : " ANALYZE=true pnpm build" ,
99 "build" : " pnpm load-hive-feed && pnpm check-links && next build && next-sitemap" ,
1010 "check-links" : " tsx check-links.ts" ,
11- "dev" : " next" ,
11+ "dev" : " pnpm load-hive-feed && next" ,
1212 "export" : " tsx rss-generator.ts" ,
1313 "load-hive-feed" : " tsx load-hive-feed.ts" ,
1414 "start" : " next start"
Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ export default class MyDocument extends Document {
2020 title = "RSS Feed for the-guild.dev"
2121 href = "/feed.xml"
2222 />
23+ < script src = "https://challenges.cloudflare.com/turnstile/v0/api.js" async defer > </ script >
24+ < link rel = "preconnect" href = "https://challenges.cloudflare.com" />
2325 </ Head >
2426 < body >
2527 < Main />
Original file line number Diff line number Diff line change 1+ import dynamic from 'next/dynamic' ;
2+
3+ type ClientOnlyProps = { children : JSX . Element } ;
4+ const ClientOnly = ( props : ClientOnlyProps ) => {
5+ const { children } = props ;
6+
7+ return children ;
8+ } ;
9+
10+ export default dynamic ( ( ) => Promise . resolve ( ClientOnly ) , {
11+ ssr : false ,
12+ } ) ;
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import clsx from 'clsx';
33import { useFormik } from 'formik' ;
44import Confetti from 'react-confetti' ;
55import * as Yup from 'yup' ;
6+ import ClientOnly from './client-only' ;
67import { GuildButton , Heading , Input } from './components' ;
78
89export const GetInTouchForm = ( ) : ReactElement => {
@@ -108,6 +109,13 @@ export const GetInTouchForm = (): ReactElement => {
108109 { touched . notes && errors . notes && (
109110 < p className = "-mt-9 text-sm text-[#f6547b]" > { errors . notes } </ p >
110111 ) }
112+ < ClientOnly >
113+ < div
114+ className = "cf-turnstile"
115+ data-sitekey = "0x4AAAAAAB-9vuIUJrCPlFK3"
116+ data-theme = "dark"
117+ />
118+ </ ClientOnly >
111119 < GuildButton
112120 as = "button"
113121 type = "submit"
You can’t perform that action at this time.
0 commit comments