fixes
This commit is contained in:
parent
583f2d9e02
commit
56acc53561
|
|
@ -58,13 +58,16 @@ export default function ActionEditor({
|
|||
onClose,
|
||||
canExit = false,
|
||||
}: ActionEditorProps) {
|
||||
const [value, setValue] = useState(0);
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
const attachmentType = initialAction
|
||||
? getActionAttachmentType(initialAction)
|
||||
: "empty";
|
||||
|
||||
const [value, setValue] = useState(
|
||||
attachmentType === "empty" ? 0 : attachmentType === "image" ? 1 : 2,
|
||||
);
|
||||
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
const [imageUrl, setImageUrl] = useState<string | null>(
|
||||
initialAction && attachmentType === "image"
|
||||
? initialAction.fileUrls[0]!
|
||||
|
|
@ -193,7 +196,7 @@ export default function ActionEditor({
|
|||
multiline
|
||||
minRows={8}
|
||||
maxRows={8}
|
||||
value={action.text}
|
||||
value={action.text ?? ""}
|
||||
onChange={(event) =>
|
||||
setAction((currentAction) => ({
|
||||
...currentAction,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user