Skip to content
Closed
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
10 changes: 8 additions & 2 deletions src/components/PhotographerBox/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { useCallback, useEffect, useMemo, useState } from "react";
import {
savePhotographer,
createSavedPhotographer,

Check failure on line 3 in src/components/PhotographerBox/index.tsx

View workflow job for this annotation

GitHub Actions / TypeScript Check & Build

'"../../api/photographer"' has no exported member named 'createSavedPhotographer'. Did you mean 'deleteSavedPhotographer'?
deleteSavedPhotographer,
} from "../../api/photographer";
import { getPhotoType } from "../../hooks/getKorean";
import { useLoginGuard } from "../../hooks/useLoginGuard";
import icn_clipOff from "../../assets/svgs/icn_clip.svg";
import icn_clipOn from "../../assets/svgs/icn_clipOn.svg";
import icn_noPhotographer from "../../assets/svgs/icn_no_photogrpher.svg";
import ModalCheck from "../ModalCheck";

interface postData {
Expand Down Expand Up @@ -48,7 +49,7 @@
setIsClipped(!clipped);
clipped
? await deleteSavedPhotographer(data.id)
: await savePhotographer(data.id);
: await createSavedPhotographer(data.id);
} catch (e) {
setIsClipped(clipped);
setShowLoginModal(true);
Expand All @@ -75,6 +76,11 @@
src={data.profileImage.url}
alt={data.profileImage.name}
className="block object-cover min-w-full min-h-full"
loading="lazy"
onError={(e) => {
e.currentTarget.onerror = null;
e.currentTarget.src = icn_noPhotographer;
}}
/>
<div className="absolute bottom-0 left-0 w-full h-[40%] bg-card-overlay pointer-events-none" />
</div>
Expand Down
10 changes: 8 additions & 2 deletions src/components/PromotionBox/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useCallback, useEffect, useMemo, useState } from "react";
import { useNavigate } from "react-router-dom";
import { savePromotion, deleteSavedPromotion } from "../../api/promotion";
import { createSavedPromotion, deleteSavedPromotion } from "../../api/promotion";

Check failure on line 3 in src/components/PromotionBox/index.tsx

View workflow job for this annotation

GitHub Actions / TypeScript Check & Build

'"../../api/promotion"' has no exported member named 'createSavedPromotion'. Did you mean 'deleteSavedPromotion'?
import { useLoginGuard } from "../../hooks/useLoginGuard";
import { getDDayText } from "../../utils/date";
import { Region } from "../../types/common";
Expand All @@ -9,6 +9,7 @@
import icn_clipOn from "../../assets/svgs/icn_clipOn.svg";
import icn_time from "../../assets/svgs/icn_event_home_clock.svg";
import icn_location from "../../assets/svgs/icn_event_home_location.svg";
import icn_camera from "../../assets/svgs/icn_camera.svg";
import ModalCheck from "../ModalCheck";

interface postData {
Expand Down Expand Up @@ -48,7 +49,7 @@
setSaveCount((prev) => (clipped ? prev - 1 : prev + 1));
clipped
? await deleteSavedPromotion(data.id)
: await savePromotion(data.id);
: await createSavedPromotion(data.id);
} catch (e) {
setIsClipped(clipped);
setSaveCount((prev) => (clipped ? prev + 1 : prev - 1));
Expand Down Expand Up @@ -108,6 +109,11 @@
className="object-cover min-w-full min-h-full"
src={image.url}
alt="이벤트 이미지"
loading="lazy"
onError={(e) => {
e.currentTarget.onerror = null;
e.currentTarget.src = icn_camera;
}}
/>
</div>
</div>
Expand Down
Loading