From 0448177746efd72f4a99022cc0eb3c54a9fd67c2 Mon Sep 17 00:00:00 2001 From: Adeodonne Date: Sat, 16 Sep 2023 23:36:52 +0300 Subject: [PATCH] fix tox in streetcode edit window --- public/index.html | 2 +- .../NewStreetcode/MainNewStreetcode.component.tsx | 13 +++---------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/public/index.html b/public/index.html index afd248606..afa044cd0 100644 --- a/public/index.html +++ b/public/index.html @@ -29,7 +29,7 @@ - + diff --git a/src/features/AdminPage/NewStreetcode/MainNewStreetcode.component.tsx b/src/features/AdminPage/NewStreetcode/MainNewStreetcode.component.tsx index 29d05ffd7..b7ff4dcf1 100644 --- a/src/features/AdminPage/NewStreetcode/MainNewStreetcode.component.tsx +++ b/src/features/AdminPage/NewStreetcode/MainNewStreetcode.component.tsx @@ -144,6 +144,9 @@ const NewStreetcode = () => { } if (parseId) { + TextsApi.getByStreetcodeId(parseId).then((result) => { + setInputInfo(result); + }); StreetcodeArtApi.getStreetcodeArtsByStreetcodeId(parseId).then((result) => { const artToUpdate = result.map((streetcodeArt) => ({ ...streetcodeArt, @@ -246,16 +249,6 @@ const NewStreetcode = () => { } }, []); - useAsync(async () => { - if (parseId !== null) { - await TextsApi.getByStreetcodeId(parseId).then((result) => { - setInputInfo(result); - }); - } else { - console.log('Parse id is null'); - } - }, [parseId]); - const scrollToErrors = () => { const errors = form.getFieldsError(); const firstErrorIndex = errors.findIndex((e) => e.errors.length > 0);