diff --git a/components/organisms/UserSettingsPage/developer-pack-form.tsx b/components/organisms/UserSettingsPage/developer-pack-form.tsx deleted file mode 100644 index ef16d7849c..0000000000 --- a/components/organisms/UserSettingsPage/developer-pack-form.tsx +++ /dev/null @@ -1,67 +0,0 @@ -import { useState } from "react"; - -import Button from "components/shared/Button/button"; -import { useToast } from "lib/hooks/useToast"; -import { supabase } from "lib/utils/supabase"; - -interface DeveloperPackFormProps { - providerToken?: string | null; - refreshUser: () => void; -} - -const DeveloperPackForm = ({ refreshUser, providerToken }: DeveloperPackFormProps) => { - const [updating, setUpdating] = useState(false); - const { toast } = useToast(); - - const handeVerification = async () => { - if (!providerToken) { - toast({ description: "Unable to connect to GitHub! Try logging out and re-connecting.", variant: "warning" }); - return; - } - - const sessionResponse = await supabase.auth.getSession(); - const sessionToken = sessionResponse?.data.session?.access_token; - setUpdating(true); - - const response = await fetch(`${process.env.NEXT_PUBLIC_API_URL}/auth/profile/developer-pack`, { - headers: { - Accept: "application/json", - "Content-Type": "application/json", - Authorization: `Bearer ${sessionToken}`, - }, - method: "PATCH", - body: JSON.stringify({ - token: providerToken, - }), - }); - - if (response.ok) { - const data = (await response.json()) as { eligible: boolean }; - if (data.eligible) { - toast({ description: "Developer pack eligibility verified!", variant: "success" }); - refreshUser?.(); - } else { - toast({ description: "Your account is not currently eligible for the developer pack", variant: "warning" }); - } - } else { - toast({ description: "Could not verify developer pack!", variant: "danger" }); - } - - setUpdating(false); - }; - - return ( -