"use client"; import { FC } from "react"; import { observer } from "mobx-react-lite"; import { Controller, useForm } from "react-hook-form"; import { Telescope } from "lucide-react"; // types import { IInstance, IInstanceAdmin } from "@plane/types"; // ui import { Button, Input, TOAST_TYPE, ToggleSwitch, setToast } from "@plane/ui"; // components import { ControllerInput } from "@/components/common"; // hooks import { useInstance } from "@/hooks/store"; export interface IGeneralConfigurationForm { instance: IInstance; instanceAdmins: IInstanceAdmin[]; } export const GeneralConfigurationForm: FC = observer((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.
( )} />
); });