merge fixes
This commit is contained in:
parent
8f6e8f9e91
commit
f1b8760a02
1 changed files with 4 additions and 6 deletions
|
|
@ -1,9 +1,8 @@
|
||||||
import { useContext, useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
import GenericModal from "../../modals/genericModal";
|
import GenericModal from "../../modals/genericModal";
|
||||||
import { TextAreaComponentType } from "../../types/components";
|
import { TextAreaComponentType } from "../../types/components";
|
||||||
|
|
||||||
import { ExternalLink } from "lucide-react";
|
import { ExternalLink } from "lucide-react";
|
||||||
import { typesContext } from "../../contexts/typesContext";
|
|
||||||
import { postValidatePrompt } from "../../controllers/API";
|
import { postValidatePrompt } from "../../controllers/API";
|
||||||
|
|
||||||
export default function PromptAreaComponent({
|
export default function PromptAreaComponent({
|
||||||
|
|
@ -15,12 +14,11 @@ export default function PromptAreaComponent({
|
||||||
disabled,
|
disabled,
|
||||||
editNode = false,
|
editNode = false,
|
||||||
}: TextAreaComponentType) {
|
}: TextAreaComponentType) {
|
||||||
const { reactFlowInstance } = useContext(typesContext);
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (disabled) {
|
if (disabled) {
|
||||||
onChange("");
|
onChange("");
|
||||||
}
|
}
|
||||||
}, [disabled, onChange]);
|
}, [disabled]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (value !== "" && !editNode) {
|
if (value !== "" && !editNode) {
|
||||||
|
|
@ -31,7 +29,7 @@ export default function PromptAreaComponent({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, [value, reactFlowInstance]);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={disabled ? "pointer-events-none w-full " : " w-full"}>
|
<div className={disabled ? "pointer-events-none w-full " : " w-full"}>
|
||||||
|
|
@ -55,7 +53,7 @@ export default function PromptAreaComponent({
|
||||||
" input-primary text-muted-foreground "
|
" input-primary text-muted-foreground "
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{value !== "" ? value : "Type your prompt here"}
|
{value !== "" ? value : "Type your prompt here..."}
|
||||||
</span>
|
</span>
|
||||||
{!editNode && (
|
{!editNode && (
|
||||||
<ExternalLink
|
<ExternalLink
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue