Skip to content

Commit

Permalink
Refactor naming
Browse files Browse the repository at this point in the history
  • Loading branch information
juniusfree authored and terryli0095 committed Mar 23, 2024
1 parent 2008ede commit ba3bd08
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ const CommandBanner = ({
});
};

const handleImageReplace = async ({ file, replaceImageCallback }) => {
const handleOnSave = async ({ file, replaceImageCallback }) => {
if (!file) {
handleResetAvatarImage();
return;
Expand All @@ -211,7 +211,7 @@ const CommandBanner = ({
openSelectFile: () => bannerImageInputField.current.click(),
imageType: AVATAR_EDITOR_TYPES.BANNER_IMAGE,
onSave: async (file: File) =>
handleImageReplace({
handleOnSave({
file,
replaceImageCallback: async () =>
await handleReplaceImage({ file, purpose: banner.purpose, imageInputField: bannerImageInputField }),
Expand All @@ -236,7 +236,7 @@ const CommandBanner = ({
openSelectFile: () => topImageInputField.current.click(),
imageType: AVATAR_EDITOR_TYPES.BANNER_LOGO_IMAGE,
onSave: async (file: File) =>
handleImageReplace({
handleOnSave({
file,
replaceImageCallback: async () =>
await handleReplaceImage({ file, purpose: logo.purpose, imageInputField: topImageInputField }),
Expand Down

0 comments on commit ba3bd08

Please sign in to comment.