Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions apps/web/src/apis/chat/getChatMessages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ const useGetChatHistories = (roomId: number, size: number = 20) => {
},
staleTime: 1000 * 60 * 5, // 5분간 캐시
enabled: !!roomId, // roomId가 있을 때만 쿼리 실행
meta: {
disableGlobalLoading: true, // 전역 로딩 비활성화
},
select: (data) => ({
pages: data.pages,
pageParams: data.pageParams,
Expand Down
1 change: 0 additions & 1 deletion apps/web/src/apis/community/getPostDetail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const useGetPostDetail = (postId: number) => {
queryKey: [CommunityQueryKeys.posts, postId],
queryFn: () => communityApi.getPostDetail(postId),
enabled: !!postId,
meta: { showGlobalSpinner: false },
});
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
"use client";

import { useIsFetching } from "@tanstack/react-query";
import { useEffect } from "react";
import MentorApplyCountContent from "@/components/mentor/MentorApplyCountContent";
import IconAlertModal from "@/components/modal/IconAlertModal";
import IconConfirmModal from "@/components/modal/IconConfirmModal";
import SurveyModal from "@/components/modal/SurveyModal";
import CloudSpinner from "@/components/ui/CloudSpinner";
import QueryProvider from "@/lib/react-query/QueryProvider";
import { useAlertModalStore } from "@/lib/zustand/useAlertModalStore";
import { useConfirmModalStore } from "@/lib/zustand/useConfirmModalStore";
Expand All @@ -22,27 +20,13 @@ const ClientModal = () => {
checkAndOpen,
} = useSurveyModalStore();

const isFetching = useIsFetching({
predicate: (query) => query.meta?.showGlobalSpinner !== false,
});

// 페이지 로드 시 만족도 조사 모달 표시 여부 확인
useEffect(() => {
checkAndOpen();
}, [checkAndOpen]);

return (
<QueryProvider>
{isFetching ? (
<div
aria-live="polite"
aria-busy="true"
className="fixed inset-0 z-50 flex cursor-wait items-center justify-center bg-black/30"
>
<CloudSpinner />
</div>
) : null}

<MentorApplyCountContent />

<SurveyModal isOpen={surveyOpen} onClose={closeSurvey} onCloseForWeek={closeSurveyForWeek} />
Expand Down
Loading