Skip to content

Commit

Permalink
chore(develop): 중복 파일 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
Doyu-Lee committed Jan 11, 2024
1 parent fa75a72 commit 3f3b79f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 61 deletions.
56 changes: 0 additions & 56 deletions firebase-messaging-sw.js

This file was deleted.

5 changes: 2 additions & 3 deletions firebase/firebase.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export async function getFCMToken() {
*/
export const onMessageListener = () => {
if (process.client) {
console.log("Foreground Message Listener registered!");
// console.log("Foreground Message Listener registered!");

const app = initializeApp(firebaseConfig);
const messaging = getMessaging(app);
Expand All @@ -68,7 +68,7 @@ export const onMessageListener = () => {
notificationTitle,
notificationOptions,
);
console.log(notif);

notif.onclick = (event) => {
event.preventDefault();
const landing_url = payload.data.landing_url;
Expand All @@ -77,7 +77,6 @@ export const onMessageListener = () => {
notif.close();
};
} else if (!isIOSApp() && isMobile) {
console.log("Mobile:AOS");
navigator.serviceWorker.ready.then(function (registration) {
registration.showNotification(
notificationTitle,
Expand Down
3 changes: 1 addition & 2 deletions public/firebase-messaging-sw.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ messaging.onBackgroundMessage(function (payload) {
const notificationTitle = payload.data.title;
const notificationOptions = {
body: payload.data.body + "백",
icon: payload.data.image_url,
image: payload.data.landing_url,
image: payload.data.image_url,
icon: "https://docent.zip/icon.png",
};
self.registration.showNotification(notificationTitle, notificationOptions);
Expand Down

0 comments on commit 3f3b79f

Please sign in to comment.