import { useTranslation } from "react-i18next"; import { useCreateConversation } from "#/hooks/mutation/use-create-conversation"; import { useIsCreatingConversation } from "#/hooks/use-is-creating-conversation"; import { BrandButton } from "../settings/brand-button"; import AllHandsLogo from "#/assets/branding/all-hands-logo-spark.svg?react"; export function HomeHeader() { const { mutate: createConversation, isPending, isSuccess, } = useCreateConversation(); const isCreatingConversationElsewhere = useIsCreatingConversation(); const { t } = useTranslation(); // We check for isSuccess because the app might require time to render // into the new conversation screen after the conversation is created. const isCreatingConversation = isPending || isSuccess || isCreatingConversationElsewhere; return (

{t("HOME$LETS_START_BUILDING")}

createConversation({})} isDisabled={isCreatingConversation} > {!isCreatingConversation && t("HOME$LAUNCH_FROM_SCRATCH")} {isCreatingConversation && t("HOME$LOADING")}

{t("HOME$OPENHANDS_DESCRIPTION")}

{t("HOME$NOT_SURE_HOW_TO_START")}{" "} {t("HOME$READ_THIS")}

); }