import React from "react"; import { Controller, useForm } from "react-hook-form"; // hooks import useUser from "hooks/use-user"; // components import Invitations from "./invitations"; import DummySidebar from "components/account/sidebar"; import OnboardingStepIndicator from "components/account/step-indicator"; import { Workspace } from "./workspace"; // types import { IWorkspace, TOnboardingSteps } from "types"; type Props = { finishOnboarding: () => Promise; stepChange: (steps: Partial) => Promise; setTryDiffAccount: () => void; }; export const JoinWorkspaces: React.FC = ({ stepChange, setTryDiffAccount }) => { const { user } = useUser(); const { handleSubmit, control, setValue, watch, formState: { errors, isSubmitting, isValid }, } = useForm({ defaultValues: { name: "", slug: `${window.location.host}/`, }, mode: "onChange", }); const handleNextStep = async () => { if (!user) return; await stepChange({ workspace_join: true, workspace_create: true }); }; return (
( 0 ? value : "New Workspace"} /> )} />

What will your workspace be?


Or


); };