Update media select in EditSightPage and CreateSightPage
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user