Skip to content

Commit 46a3ce6

Browse files
committed
fix: 로딩 무한 루프 및 알림 카운트 null 오류 수정
1 parent 38fe7d9 commit 46a3ce6

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

src/AuthProvider.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export const AuthProvider = ({ children }: AuthLayoutProps) => {
1414
const initializeAuth = async () => {
1515
const accessToken = tokenStorage.getAccessToken();
1616
if (accessToken === null) {
17+
setIsLoading(false);
1718
return;
1819
}
1920
const success = await handleGetUserInfo();

src/components/HomePage/TopButtonContainer/TopButtonContainer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const TopButtonContainer = () => {
1212
if (isLoading || isError || !data) {
1313
unreadNotifications = 0;
1414
} else {
15-
unreadNotifications = data?.result.count;
15+
unreadNotifications = data?.result?.count ?? 0;
1616
}
1717

1818
return (

0 commit comments

Comments
 (0)