Skip to content

Commit

Permalink
fix: User class bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ptyoiy committed Jul 3, 2024
1 parent d7b1882 commit 20dbeb8
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 11 deletions.
7 changes: 0 additions & 7 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,10 @@ function App() {
registration = await navigator.serviceWorker.register('./firebaseSW.js');
if (registration) {
console.log('registration success', registration.scope, registration.active);
registration.showNotification('registration success', {
body: 'registration success body',
data: 'naver.com',
});
}
navigator.serviceWorker.addEventListener('message', (event) => {
if (!event.data.action) return;
const { data, action } = event.data;
console.log('data:', event.data);
const [type, id] = (data as string).split('=');
switch (action) {
case 'notificationClick':
Expand All @@ -74,7 +69,6 @@ function App() {
});
const messaging = getMessaging(app);
unsub = onMessage(messaging, (payload) => {
console.log({ payload });
registration.showNotification(payload.notification.title, {
body: payload.notification.body,
data: payload.fcmOptions.link,
Expand All @@ -85,7 +79,6 @@ function App() {
}
return () => {
if (unsub) {
console.log('clean');
unsub();
registration.unregister();
}
Expand Down
3 changes: 0 additions & 3 deletions src/context/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ export function UserProvider({ children }: { children: ReactNode }) {
});
const userInfo = useUserInfoQuery(userData);

console.log({ userData });
const navigate = useNavigate();
const value = useMemo(() => ({ userData, dispatch }), [userData]);

Expand All @@ -76,7 +75,6 @@ export function UserProvider({ children }: { children: ReactNode }) {
(response) => response,
async (error: AxiosError) => {
const originalRequest = error.config;
console.log({ originalRequest });
switch (error.response.status) {
// access 없음
// access 만료시 갱신
Expand Down Expand Up @@ -119,7 +117,6 @@ export function UserProvider({ children }: { children: ReactNode }) {
});
}
};
console.log({ userInfo });
if (userInfo.isSuccess) checkFcmToken();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [userInfo?.isSuccess]);
Expand Down
1 change: 0 additions & 1 deletion src/context/user.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ export class User {
eventsLike?: IEventsLike,
) {
this.user = user;
this.alarm = alarm;
this.bookmark = bookmark;
this.noticeRead = reads;
this.noticesLike = noticesLike;
Expand Down

0 comments on commit 20dbeb8

Please sign in to comment.