diff --git a/services/web/frontend/js/features/history/components/change-list/add-label-modal.tsx b/services/web/frontend/js/features/history/components/change-list/add-label-modal.tsx index 95a148ae2a..409fbee428 100644 --- a/services/web/frontend/js/features/history/components/change-list/add-label-modal.tsx +++ b/services/web/frontend/js/features/history/components/change-list/add-label-modal.tsx @@ -40,12 +40,11 @@ function AddLabelModal({ show, setShow, version }: AddLabelModalProps) { addUpdateLabel(label) reset() - - // TODO - // _handleHistoryUIStateChange() } - const handleAddLabel = () => { + const handleSubmit = (e: React.FormEvent) => { + e.preventDefault() + runAsync(addLabel(projectId, { comment, version }, signal)) .then(() => setShow(false)) .catch(console.error) @@ -68,39 +67,40 @@ function AddLabelModal({ show, setShow, version }: AddLabelModalProps) { {t('history_add_label')} - - {isError && } - - ) => - setComment(e.target.value) - } - autoFocus // eslint-disable-line jsx-a11y/no-autofocus - /> - - - - - - +
+ + {isError && } + + + ) => setComment(e.target.value)} + autoFocus // eslint-disable-line jsx-a11y/no-autofocus + /> + + + + + + +
) } diff --git a/services/web/frontend/js/features/history/components/change-list/tag-tooltip.tsx b/services/web/frontend/js/features/history/components/change-list/tag-tooltip.tsx index 37593ae5f2..68b3897f95 100644 --- a/services/web/frontend/js/features/history/components/change-list/tag-tooltip.tsx +++ b/services/web/frontend/js/features/history/components/change-list/tag-tooltip.tsx @@ -45,8 +45,6 @@ function Tag({ label, currentUserId, ...props }: TagProps) { } reset() - - // TODO _handleHistoryUIStateChange } const localDeleteHandler = () => {