Skip to content

Commit

Permalink
Refactor ConfirmModal and DashboardToolbar for improved code readabil…
Browse files Browse the repository at this point in the history
…ity and consistency
  • Loading branch information
simlarsen committed Dec 3, 2024
1 parent 9d0add6 commit b380e6d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions Common/UI/Components/Modal/ConfirmModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ const ConfirmModal: FunctionComponent<ComponentProps> = (
submitButtonText={
props.submitButtonText ? props.submitButtonText : "Confirm"
}
closeButtonText={
props.closeButtonText ? props.closeButtonText : "Cancel"
}
closeButtonText={props.closeButtonText ? props.closeButtonText : "Cancel"}
closeButtonStyleType={
props.closeButtonType ? props.closeButtonType : ButtonStyleType.NORMAL
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ const DashboardToolbar: FunctionComponent<ComponentProps> = (
icon={IconProp.Close}
title="Cancel"
buttonStyle={ButtonStyleType.HOVER_DANGER_OUTLINE}
onClick={()=>{
onClick={() => {
setShowCancelModal(true);
}}
/>
Expand All @@ -149,10 +149,10 @@ const DashboardToolbar: FunctionComponent<ComponentProps> = (
closeButtonText={"Keep Editing"}
onSubmit={() => {
props.onCancelEditClick();
setShowCancelModal(false);
setShowCancelModal(false);
}}
onClose={() => {
setShowCancelModal(false);
setShowCancelModal(false);
}}
/>
) : (
Expand Down

0 comments on commit b380e6d

Please sign in to comment.