Skip to content

Commit 9816cbc

Browse files
authored
MMI-3183 Fixed the posted on time issue (#2403)
- when the user publish the content for the first time from the edit content page, the posted on time should be updated
1 parent 27b6499 commit 9816cbc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/editor/src/features/content/form/hooks/useContentForm.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,8 +314,11 @@ export const useContentForm = ({
314314
ContentStatusName.Unpublish,
315315
ContentStatusName.Unpublished,
316316
].includes(values.status)
317-
)
317+
) {
318318
values.status = ContentStatusName.Publish;
319+
// the posted on time should be the first publish time that the editor publish to MMI.
320+
values.postedOn = moment.utc().format();
321+
}
319322

320323
return await handleSubmit(values, formikHelpers);
321324
},

0 commit comments

Comments
 (0)