From 40e60ad2141f57e1c071dae2879936060a9f8af8 Mon Sep 17 00:00:00 2001 From: Simon Vrachliotis Date: Tue, 5 Sep 2023 13:01:26 +1000 Subject: [PATCH] remove unused forms (can always retrieve from GIT history) --- docs/.env.example | 2 - docs/src/components/forms/get-access.tsx | 121 --------------------- docs/src/components/forms/get-notified.tsx | 84 -------------- docs/src/components/forms/table-id.ts | 8 -- 4 files changed, 215 deletions(-) delete mode 100644 docs/src/components/forms/get-access.tsx delete mode 100644 docs/src/components/forms/get-notified.tsx diff --git a/docs/.env.example b/docs/.env.example index 55e9b9723..66969bf9e 100644 --- a/docs/.env.example +++ b/docs/.env.example @@ -2,8 +2,6 @@ NEXT_PUBLIC_AIRTABLE_TOKEN= NEXT_PUBLIC_AIRTABLE_BASE_ID= -NEXT_PUBLIC_AIRTABLE_GET_ACCESS_TABLE_ID= -NEXT_PUBLIC_AIRTABLE_GET_NOTIFIED_TABLE_ID= NEXT_PUBLIC_AIRTABLE_SEND_MESSAGE_TABLE_ID= NEXT_PUBLIC_AIRTABLE_MAILING_LIST_TABLE_ID= diff --git a/docs/src/components/forms/get-access.tsx b/docs/src/components/forms/get-access.tsx deleted file mode 100644 index 9dc37c38d..000000000 --- a/docs/src/components/forms/get-access.tsx +++ /dev/null @@ -1,121 +0,0 @@ -import { ArrowSmallRightIcon } from '@heroicons/react/24/solid'; - -import Button from '../button'; -import { useFormSubmission } from '../../hooks/useFormSubmission'; -import type { Template } from '../templates'; -import { GET_ACCESS_TABLE_ID } from './table-id'; -import { useSearchParams } from 'next/navigation'; - -export default function GetAccessForm({ template }: { template: Template }) { - const templateParam = useSearchParams()?.get('template') || ''; - const { sendForm, isLoading } = useFormSubmission(); - - async function handleSubmit(event: React.FormEvent) { - event.preventDefault(); - const form = event.currentTarget; - sendForm({ - tableId: GET_ACCESS_TABLE_ID, - form, - onSuccess: () => { - if (!template.repo) return; - const url = new URL('https://vercel.com/new/clone'); - url.searchParams.set('repository-name', template.repo.suggestedName); - url.searchParams.set('project-name', template.repo.suggestedName); - url.searchParams.set( - 'redirect-url', - `https://keystatic.cloud/deploy/deployed` - ); - url.searchParams.set( - 'repository-url', - `https://github.com/${template.repo.owner}/${template.repo.name}` - ); - url.searchParams.set( - 'integration-ids', - process.env.NEXT_PUBLIC_VERCEL_CLIENT_ID! - ); - - window.location.href = url.toString(); - }, - }); - } - return ( -
- - -
-
- - -
-
- - -
-
-
- -