Skip to content

Commit

Permalink
fix: change callback function name
Browse files Browse the repository at this point in the history
  • Loading branch information
Najeong-Kim committed Dec 6, 2024
1 parent 784a354 commit 6d7af8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/shared/lib/postAppMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ declare global {
}
}

const postAppMessage = (method: AppMessageMethod, message: string, isWebview: boolean, showToast: (message: string) => void) => {
const postAppMessage = (method: AppMessageMethod, message: string, isWebview: boolean, callback: (message: string) => void) => {
const userAgent = navigator.userAgent.toLowerCase();
const android = userAgent.match(/android/i);
const iphone = userAgent.match(/iphone/i);
Expand All @@ -33,7 +33,7 @@ const postAppMessage = (method: AppMessageMethod, message: string, isWebview: bo
return window.webkit.messageHandlers.weski.postMessage({ method: method, message: message });
}
}
return showToast(message);
return callback(message);
}

export default postAppMessage;

0 comments on commit 6d7af8b

Please sign in to comment.