From 421798bd6d888a40ce87391797ccd227e81feef4 Mon Sep 17 00:00:00 2001 From: Chloe Mouret Date: Fri, 25 Aug 2023 11:45:57 +0200 Subject: [PATCH] add 2 save buttons --- .../components/SettingsTab/SettingsTab.tsx | 9 ++++++++- frontend/shared/SaveButton.tsx | 16 ++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 frontend/shared/SaveButton.tsx diff --git a/frontend/app/brains-management/[brainId]/components/BrainManagementTabs/components/SettingsTab/SettingsTab.tsx b/frontend/app/brains-management/[brainId]/components/BrainManagementTabs/components/SettingsTab/SettingsTab.tsx index 2aab64d392ce..313a3f60be0c 100644 --- a/frontend/app/brains-management/[brainId]/components/BrainManagementTabs/components/SettingsTab/SettingsTab.tsx +++ b/frontend/app/brains-management/[brainId]/components/BrainManagementTabs/components/SettingsTab/SettingsTab.tsx @@ -15,6 +15,7 @@ import { paidModels, } from "@/lib/context/BrainConfigProvider/types"; import { defineMaxTokens } from "@/lib/helpers/defineMaxTokens"; +import { SaveButton } from "@/shared/SaveButton"; import { PublicPrompts } from "./components/PublicPrompts/PublicPrompts"; import { useSettingsTab } from "./hooks/useSettingsTab"; @@ -54,7 +55,7 @@ export const SettingsTab = ({ brainId }: SettingsTabProps): JSX.Element => {
{ {...register("maxTokens")} /> +
+ +
{ className="flex-1" {...register("prompt.content")} /> +
+ +
{promptId !== "" && ( +);