fix welcome text rerender & add copyright (#2525)

This commit is contained in:
heheer
2024-08-26 16:03:15 +08:00
committed by GitHub
parent f7544ea47b
commit fd3f32d083
4 changed files with 31 additions and 10 deletions

View File

@@ -89,22 +89,19 @@ const NodeUserGuide = ({ data, selected }: NodeProps<FlowNodeItemType>) => {
export default React.memo(NodeUserGuide);
function WelcomeText({ chatConfig: { welcomeText }, setAppDetail }: ComponentProps) {
const [, startTst] = useTransition();
return (
<Box className="nodrag">
<WelcomeTextConfig
resize={'both'}
value={welcomeText}
onChange={(e) => {
startTst(() => {
setAppDetail((state) => ({
...state,
chatConfig: {
...state.chatConfig,
welcomeText: e.target.value
}
}));
});
setAppDetail((state) => ({
...state,
chatConfig: {
...state.chatConfig,
welcomeText: e.target.value
}
}));
}}
/>
</Box>