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