Need help finding your Twilio credentials?
-
+
diff --git a/app/settings/components/phone/phone-number-form.tsx b/app/settings/components/phone/phone-number-form.tsx
new file mode 100644
index 0000000..7ee33f5
--- /dev/null
+++ b/app/settings/components/phone/phone-number-form.tsx
@@ -0,0 +1,76 @@
+import { useEffect } from "react";
+import { useMutation, useQuery } from "blitz";
+import { useForm } from "react-hook-form";
+
+import setPhoneNumber from "../../mutations/set-phone-number";
+import getAvailablePhoneNumbers from "../../queries/get-available-phone-numbers";
+import useCurrentUser from "app/core/hooks/use-current-user";
+import useUserPhoneNumber from "app/core/hooks/use-current-phone-number";
+import Button from "../button";
+import SettingsSection from "../settings-section";
+
+type Form = {
+ phoneNumberSid: string;
+};
+
+export default function PhoneNumberForm() {
+ const { hasFilledTwilioCredentials } = useCurrentUser();
+ const currentPhoneNumber = useUserPhoneNumber();
+ const {
+ register,
+ handleSubmit,
+ setValue,
+ formState: { isSubmitting },
+ } = useForm
+ }
+ >
+
+
+
+
+ );
+}
diff --git a/app/settings/components/phone/twilio-api-form.tsx b/app/settings/components/phone/twilio-api-form.tsx
new file mode 100644
index 0000000..d26c09b
--- /dev/null
+++ b/app/settings/components/phone/twilio-api-form.tsx
@@ -0,0 +1,90 @@
+import { useEffect, useState } from "react";
+import { useMutation } from "blitz";
+import { useForm } from "react-hook-form";
+import { IoHelpCircle } from "react-icons/io5";
+
+import setTwilioApiFields from "../../mutations/set-twilio-api-fields";
+import useCurrentUser from "app/core/hooks/use-current-user";
+import HelpModal from "./help-modal";
+import Button from "../button";
+import SettingsSection from "../settings-section";
+
+type Form = {
+ twilioAccountSid: string;
+ twilioAuthToken: string;
+};
+
+export default function TwilioApiForm() {
+ const {
+ register,
+ handleSubmit,
+ setValue,
+ formState: { isSubmitting },
+ } = useForm