Skip to content

Commit

Permalink
feat : fcm ์„ค์ •
Browse files Browse the repository at this point in the history
  • Loading branch information
HelloWook committed Dec 9, 2024
1 parent 66dc76b commit b750ac5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
14 changes: 14 additions & 0 deletions public/firebase-messaging-sw.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
importScripts("https://www.gstatic.com/firebasejs/8.7.1/firebase-app.js");
importScripts("https://www.gstatic.com/firebasejs/8.7.1/firebase-messaging.js");

firebase.initializeApp({
apiKey: "AIzaSyBodJm9QErZvWuaOdM6Af1H82LA-8ZcmhE",
authDomain: "fcm-test-51b74.firebaseapp.com",
projectId: "fcm-test-51b74",
storageBucket: "fcm-test-51b74.firebasestorage.app",
messagingSenderId: "10805910843",
appId: "1:10805910843:web:e88131c7c1ef503822eb1e",
measurementId: "G-FXC5BWDC6G",
});

const messaging = firebase.messaging();
3 changes: 2 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ import { RouterProvider } from 'react-router-dom';
import { router } from '@/router';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
import { usePushNotification } from './hooks/usePushNotification ';

export const App = () => {
const queryClient = new QueryClient();

usePushNotification();
return (
<QueryClientProvider client={queryClient}>
<ToastContainer />
Expand Down

0 comments on commit b750ac5

Please sign in to comment.