Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 모임 생성 최신미팅 반영 #167

Merged
merged 1 commit into from
Aug 27, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ export const ContentWrapperCss = css({
transition: 'transform 0.2s ease',
height: 'calc(100% - 54px)',
backgroundColor: `${colors.grey200}`,
padding: '8px 0',
overflow: 'auto',
padding: '8px 0 40px',
overflow: 'hidden',
});
Original file line number Diff line number Diff line change
Expand Up @@ -37,25 +37,21 @@ export const useSetCurrentMeeting = () => {
}
}
};
useEffect(() => {
if (currentMeeting) {
setCurrentMeeting(null);
}
}, []);

useEffect(() => {
if (!currentMeeting) {
const lastVisitedMeeting = getCurrentMeeting(meetingInfo);

try {
if (lastVisitedMeeting) {
mutateAsync({ meetingId: lastVisitedMeeting.meetingId });
}
} catch (error) {
console.log(error);
const lastVisitedMeeting = getCurrentMeeting(meetingInfo);
try {
if (lastVisitedMeeting) {
mutateAsync({ meetingId: lastVisitedMeeting.meetingId });
}
setCurrentMeeting(lastVisitedMeeting);
} catch (error) {
console.log(error);
}

return () => {
setCurrentMeeting(null);
};
}, [meetingInfo]);

return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { getWebDomain } from '@/common';
import { generateInviteLink } from '@/common/utils/generateInviteLink';
import { getKeywordRegex } from '@/common/utils/getKeywordRegex';
import { useGetInviteCode } from '@/home/common/apis/queries/useGetInviteCode';
import { useGetMyInfo } from '@/home/common/apis/queries/useGetMyInfo';
import { MemberType } from '@/home/common/apis/schema/useGetProgressingQuestionQuery.type';
import { HomeAtoms } from '@/home/common/atoms/home.atom';

Expand All @@ -19,11 +18,6 @@ export const useGatherMemberProfileListService = () => {
const [gatherMemberList, setGatherMemberList] = useState<MemberType[]>([]);
const meetingId = currentMeeting?.meetingId;

const { data: myInfo } = useGetMyInfo({
params: { meetingId: meetingId! },
options: { enabled: !!meetingId },
});

const { data } = useGetGatherMemberList({
params: { meetingId: meetingId! },
options: {
Expand Down Expand Up @@ -59,10 +53,10 @@ export const useGatherMemberProfileListService = () => {
};

useEffect(() => {
if (data?.contents && myInfo) {
if (data?.contents) {
setGatherMemberList(data?.contents);
}
}, [data, myInfo]);
}, [data]);

useEffect(() => {
let filter;
Expand Down
Loading