Update media select in EditSightPage and CreateSightPage

This commit is contained in:
2025-06-03 14:32:42 +03:00
parent f0e03c3a1d
commit 078f051e8a
14 changed files with 1361 additions and 1175 deletions

View File

@@ -32,7 +32,7 @@ export const CreateLeftTab = observer(
deleteLeftArticle,
createLeftArticle,
unlinkLeftArticle,
createLinkWithArticle,
createLinkWithLeftArticle,
} = createSightStore;
const {
deleteMedia,
@@ -75,10 +75,10 @@ export const CreateLeftTab = observer(
media_name?: string;
media_type: number;
}) => {
await createLinkWithArticle(media);
await createLinkWithLeftArticle(media);
setIsSelectMediaDialogOpen(false);
},
[createLinkWithArticle]
[createLinkWithLeftArticle]
);
const handleArticleSelect = useCallback(
@@ -437,7 +437,7 @@ export const CreateLeftTab = observer(
afterUpload={async (media) => {
setUploadMediaOpen(false);
setFileToUpload(null);
await createLinkWithArticle(media);
await createLinkWithLeftArticle(media);
}}
/>
<SelectArticleModal