import { FC } from "react"; import { Controller, useForm } from "react-hook-form"; import { Telescope } from "lucide-react"; import { IInstance, IInstanceAdmin } from "@plane/types"; import { Button, Input, TOAST_TYPE, ToggleSwitch, setToast } from "@plane/ui"; // components import { ControllerInput } from "components/common"; // hooks import { useInstance } from "@/hooks"; export interface IGeneralConfigurationForm { instance: IInstance["instance"]; instanceAdmins: IInstanceAdmin[]; } export const GeneralConfigurationForm: FC = (props) => { const { instance, instanceAdmins } = props; // hooks const { updateInstanceInfo } = useInstance(); // form data const { handleSubmit, control, formState: { errors, isSubmitting }, } = useForm>({ defaultValues: { instance_name: instance.instance_name, is_telemetry_enabled: instance.is_telemetry_enabled, }, }); const onSubmit = async (formData: Partial) => { const payload: Partial = { ...formData }; console.log("payload", payload); await updateInstanceInfo(payload) .then(() => setToast({ type: TOAST_TYPE.SUCCESS, title: "Success", message: "Settings updated successfully", }) ) .catch((err) => console.error(err)); }; return (
Instance details

Email

Instance ID

Telemetry
Allow Plane to collect anonymous usage events
We collect usage events without any PII to analyse and improve Plane.{" "} Know more.
( )} />
); };