Skip to content

Commit

Permalink
๐Ÿฉน chore: ์˜คํƒ€ ์ˆ˜์ •
Browse files Browse the repository at this point in the history
  • Loading branch information
gw-lim committed Feb 20, 2024
1 parent 0623c5d commit 1389361
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const MyArtistTab = ({ userId }: Props) => {
)}
<div className="flex w-full flex-col items-center">
<div className="flex w-full flex-wrap justify-center gap-20 pc:justify-start pc:gap-32">
{myArtistsData.legnth ? (
{myArtistsData.length ? (
myArtistsData.map((cardList: MyArtistsType) => (
<ArtistCard
key={cardList.artistId}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import ChipButton from "@/components/chip/ChipButton";

type StatueType = "" | "์˜ˆ์ •" | "์ข…๋ฃŒ" | "์ง„ํ–‰์ค‘" | "์ข…๋ฃŒ์ œ์™ธ";
type StatusType = "" | "์˜ˆ์ •" | "์ข…๋ฃŒ" | "์ง„ํ–‰์ค‘" | "์ข…๋ฃŒ์ œ์™ธ";

interface Props {
statue: string;
setStatus: (statue: StatueType) => void;
status: string;
setStatus: (status: StatusType) => void;
}

const ChipButtons = ({ statue, setStatus }: Props) => {
const handleChipClick = (label: StatueType) => {
const ChipButtons = ({ status, setStatus }: Props) => {
const handleChipClick = (label: StatusType) => {
switch (label) {
case statue:
case status:
setStatus("");
break;
case "์˜ˆ์ •":
Expand All @@ -27,9 +27,9 @@ const ChipButtons = ({ statue, setStatus }: Props) => {

return (
<div className="flex w-full gap-12">
<ChipButton label="์˜ˆ์ •" onClick={() => handleChipClick("์˜ˆ์ •")} selected={statue === "์˜ˆ์ •"} />
<ChipButton label="์ง„ํ–‰์ค‘" onClick={() => handleChipClick("์ง„ํ–‰์ค‘")} selected={statue === "์ง„ํ–‰์ค‘"} />
<ChipButton label="์ข…๋ฃŒ" onClick={() => handleChipClick("์ข…๋ฃŒ")} selected={statue === "์ข…๋ฃŒ"} />
<ChipButton label="์˜ˆ์ •" onClick={() => handleChipClick("์˜ˆ์ •")} selected={status === "์˜ˆ์ •"} />
<ChipButton label="์ง„ํ–‰์ค‘" onClick={() => handleChipClick("์ง„ํ–‰์ค‘")} selected={status === "์ง„ํ–‰์ค‘"} />
<ChipButton label="์ข…๋ฃŒ" onClick={() => handleChipClick("์ข…๋ฃŒ")} selected={status === "์ข…๋ฃŒ"} />
</div>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ interface Props {
userId: string;
}

type StatueType = "" | "์˜ˆ์ •" | "์ข…๋ฃŒ" | "์ง„ํ–‰์ค‘" | "์ข…๋ฃŒ์ œ์™ธ";
type StatusType = "" | "์˜ˆ์ •" | "์ข…๋ฃŒ" | "์ง„ํ–‰์ค‘" | "์ข…๋ฃŒ์ œ์™ธ";

const MyCalendarTab = ({ userId }: Props) => {
const [data, setData] = useState<EventCardType[] | []>([]);
const [isFold, setIsFold] = useState(true);
const [statue, setStatus] = useState<StatueType>("");
const [status, setStatus] = useState<StatusType>("");
const [calendarStyle, setCalendarStyle] = useState("");
const [selectedDate, setSelectedDate] = useState<Date | null>(null);

const { data: myEventsData, isSuccess } = useQuery({
queryKey: ["events", statue],
queryKey: ["events", status],
queryFn: async () => {
return instance.get(`/event/${userId}/like`, { status: statue });
return instance.get(`/event/${userId}/like`, { status });
},
});

Expand Down Expand Up @@ -77,7 +77,7 @@ const MyCalendarTab = ({ userId }: Props) => {
)}
</div>
<div className="w-full">
<ChipButtons setStatus={setStatus} statue={statue} />
<ChipButtons setStatus={setStatus} status={status} />
<section>
{data
.filter(
Expand Down
2 changes: 1 addition & 1 deletion app/(route)/event/[eventId]/_components/Banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const Banner = ({ data, eventId }: Props) => {
<div className="hidden pc:block">
<LinkIcon {...IconStyleProps.pc} />
</div>
<Link href={data?.eventUrl ?? ""} target="_blank" rel="noreferrer noopener" className="text-wrap text-blue">
<Link href={data?.eventUrl ?? ""} target="_blank" rel="noreferrer noopener" className="text-blue">
{data?.eventUrl}
</Link>
</SubDescription>
Expand Down

0 comments on commit 1389361

Please sign in to comment.