Skip to content

Commit

Permalink
UI/group (#241)
Browse files Browse the repository at this point in the history
  • Loading branch information
SeungJL authored Nov 6, 2024
1 parent 557cafb commit 3320e23
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
8 changes: 4 additions & 4 deletions modals/groupStudy/AttendCheckModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import dayjs from "dayjs";
import { useState } from "react";
import styled from "styled-components";

import { GROUP_STUDY_ALL } from "../../constants/keys/queryKeys";
import { GROUP_STUDY } from "../../constants/keys/queryKeys";
import { useResetQueryData } from "../../hooks/custom/CustomHooks";
import { useCompleteToast } from "../../hooks/custom/CustomToast";
import { useGroupAttendMutation } from "../../hooks/groupStudy/mutations";
Expand Down Expand Up @@ -37,7 +37,7 @@ function AttendCheckModal({
const { mutate } = useGroupAttendMutation(id, {
onSuccess() {
completeToast("free", "저장되었습니다.");
resetQueryData([GROUP_STUDY_ALL]);
resetQueryData([GROUP_STUDY]);
setIsModal(false);
},
});
Expand Down Expand Up @@ -90,8 +90,8 @@ function AttendCheckModal({
myAttend?.includes(day)
? "mint"
: mySubAttend?.includes(day)
? "yellowTheme"
: "gray"
? "yellowTheme"
: "gray"
}
>
{dayjsToFormat(item, "ddd요일")}
Expand Down
5 changes: 2 additions & 3 deletions modals/groupStudy/InviteOuterModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Flex } from "@chakra-ui/react";
import { useParams } from "next/navigation";
import { useQueryClient } from "react-query";

import { GROUP_STUDY_ALL } from "../../constants/keys/queryKeys";
import { GROUP_STUDY } from "../../constants/keys/queryKeys";
import { useCompleteToast } from "../../hooks/custom/CustomToast";
import { useGroupWaitingStatusMutation } from "../../hooks/groupStudy/mutations";
import { IModal } from "../../types/components/modalTypes";
Expand All @@ -17,10 +17,9 @@ function InviteOuterModal({ setIsModal }: InviteOuterModalProps) {
const { mutate: mutate2, isLoading } = useGroupWaitingStatusMutation(+id, {
onSuccess() {
completeToast("free", "가입되었습니다.");
queryClient.invalidateQueries([GROUP_STUDY_ALL]);
queryClient.invalidateQueries([GROUP_STUDY]);
},
});


const footerOptions: IFooterOptions = {
main: {
Expand Down
4 changes: 2 additions & 2 deletions modals/groupStudy/WritingConfirmModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import styled from "styled-components";

import SuccessScreen from "../../components/layouts/SuccessScreen";
import { GROUP_WRITING_STORE } from "../../constants/keys/localStorage";
import { GROUP_STUDY, GROUP_STUDY_ALL } from "../../constants/keys/queryKeys";
import { GROUP_STUDY } from "../../constants/keys/queryKeys";
import { useResetQueryData } from "../../hooks/custom/CustomHooks";
import { useCompleteToast, useErrorToast } from "../../hooks/custom/CustomToast";
import { useGroupWritingMutation } from "../../hooks/groupStudy/mutations";
Expand Down Expand Up @@ -37,7 +37,7 @@ function GroupConfirmModal({ setIsModal, groupWriting }: IGroupConfirmModal) {

const { mutate } = useGroupWritingMutation("post", {
onSuccess() {
resetQueryData([GROUP_STUDY_ALL]);
resetQueryData([GROUP_STUDY]);
resetLocalStorage();
setIsSuccessScreen(true);
},
Expand Down
4 changes: 2 additions & 2 deletions pageTemplates/group/admin/GroupAdminInvitation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Input } from "../../../components/atoms/Input";
import { MainLoadingAbsolute } from "../../../components/atoms/loaders/MainLoading";
import Selector from "../../../components/atoms/Selector";
import InviteUserGroups from "../../../components/molecules/groups/InviteUserGroups";
import { GROUP_STUDY_ALL } from "../../../constants/keys/queryKeys";
import { GROUP_STUDY } from "../../../constants/keys/queryKeys";
import { LOCATION_ALL } from "../../../constants/location";
import { useAdminUsersLocationControlQuery } from "../../../hooks/admin/quries";
import { useCompleteToast } from "../../../hooks/custom/CustomToast";
Expand Down Expand Up @@ -45,7 +45,7 @@ export default function GroupAdminInvitation() {
const { mutate: mutate2 } = useGroupWaitingStatusMutation(+id, {
onSuccess() {
completeToast("free", "가입되었습니다.");
queryClient.invalidateQueries([GROUP_STUDY_ALL]);
queryClient.invalidateQueries([GROUP_STUDY]);
refetch();
},
});
Expand Down
4 changes: 2 additions & 2 deletions pages/group/[id]/member.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import AlertModal, { IAlertModalOptions } from "../../../components/AlertModal";
import Header from "../../../components/layouts/Header";
import Slide from "../../../components/layouts/PageSlide";
import ProfileCommentCard from "../../../components/molecules/cards/ProfileCommentCard";
import { GROUP_STUDY_ALL } from "../../../constants/keys/queryKeys";
import { GROUP_STUDY } from "../../../constants/keys/queryKeys";
import { GROUP_STUDY_ROLE } from "../../../constants/settingValue/groupStudy";
import { useCompleteToast } from "../../../hooks/custom/CustomToast";
import { useGroupExileUserMutation } from "../../../hooks/groupStudy/mutations";
Expand Down Expand Up @@ -39,7 +39,7 @@ export default function Member() {
const queryClient = useQueryClient();
const { mutate } = useGroupExileUserMutation(+id, {
onSuccess() {
queryClient.invalidateQueries([GROUP_STUDY_ALL]);
queryClient.invalidateQueries([GROUP_STUDY]);
completeToast("free", "추방되었습니다.");
},
onError(err) {
Expand Down

0 comments on commit 3320e23

Please sign in to comment.