Skip to content

Commit

Permalink
✨ Feat(#315): 참여중인 스테디 탈퇴 기능 toast로 추후 업데이트 예정 알림
Browse files Browse the repository at this point in the history
  • Loading branch information
JIY00N2 committed Dec 2, 2023
1 parent 6bf62bf commit ab9a7df
Showing 1 changed file with 12 additions and 18 deletions.
30 changes: 12 additions & 18 deletions src/app/(user-menu)/mysteady/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import { Fragment } from "react";
import InfiniteScroll from "react-infinite-scroller";
import Link from "next/link";
import { useSearchParams } from "next/navigation";
import { useToast } from "@/components/ui/use-toast";
import { cn } from "@/lib/utils";
import { Separator } from "@radix-ui/themes";
import { format } from "date-fns";
import type { MySteadyContentType } from "@/services/types";
import Button, { buttonSize } from "@/components/_common/Button";
import Button from "@/components/_common/Button";
import ContactTag from "@/components/_common/ContactTag";
import Dropdown from "@/components/_common/Dropdown";
import Icon from "@/components/_common/Icon";
import { AlertModal } from "@/components/_common/Modal";
import { useMySteadiesQuery } from "@/hooks/query/useMySteadiesQuery";
import { useScrollTo } from "@/hooks/useScrollTo";

Expand All @@ -39,6 +39,7 @@ const MySteadyPage = () => {
direction: "desc",
});
const ref = useScrollTo<HTMLDivElement>({ top: 0 }, [search]);
const { toast } = useToast();

const renderIcon = (steady: MySteadyContentType) => {
if (search === "finished") {
Expand Down Expand Up @@ -74,24 +75,17 @@ const MySteadyPage = () => {
}
if (!steady.isLeader && (search === "recruiting" || search === "closed")) {
return (
<AlertModal
trigger={
<Icon
name="exit"
size={20}
color="text-st-black"
/>
}
actionButton={
<Button className={`${buttonSize.sm} bg-st-red text-st-white`}>
탈퇴
</Button>
<div
onClick={() =>
toast({ description: "준비중인 기능입니다!", variant: "blue" })
}
>
<div className="flex items-center justify-center">
<div className="text-18 font-bold">정말 탈퇴하시겠습니까?</div>
</div>
</AlertModal>
<Icon
name="exit"
size={20}
color="text-st-black"
/>
</div>
);
}
};
Expand Down

0 comments on commit ab9a7df

Please sign in to comment.