Skip to content

Commit 700c41e

Browse files
committed
๐Ÿ› Fix: ๋ฉ”ํƒ€ํƒœ๊ทธ ์„ค์ • ์ˆ˜์ •, ์ด๋ฏธ์ง€ ์ ˆ๋Œ€ ๊ฒฝ๋กœ๋กœ ์ˆ˜์ •
1 parent 4c83ead commit 700c41e

File tree

4 files changed

+30
-4
lines changed

4 files changed

+30
-4
lines changed

โ€Žindex.htmlโ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<meta name="apple-mobile-web-app-capable" content="yes">
88
<meta name="mobile-web-app-capable" content="yes">
99
<title>๋Ÿฌ๋‹ํ•œ๋‹ค์ด</title>
10-
<meta name="description" content="" />
10+
<meta name="description" content="๋ถ€์‚ฐ ๋Ÿฌ๋‹ ์ฝ”์Šค ์ถ”์ฒœ ์„œ๋น„์Šค" />
1111

1212
<!-- OG Tags - ๋™์ ์œผ๋กœ ์—…๋ฐ์ดํŠธ๋จ -->
1313
<meta property="og:title" content="" />
7.29 KB
Loading

โ€Žsrc/pages/courseDetail/CourseDetail.tsxโ€Ž

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import MetaTags from '@/components/MetaTags';
2020
import ScrollIconSrc from '@/assets/icons/scroll-up.svg';
2121
import LoadingMotion from '@/assets/animations/run-loading.json';
2222
import NoCourseImgSrc from '@/assets/images/sad-emoji.png';
23-
import DefaultThumbnailSrc from '@/assets/images/thumbnail-default.png';
2423

2524
const CourseDetail = () => {
2625
const [t] = useTranslation();
@@ -77,12 +76,17 @@ const CourseDetail = () => {
7776
if (courseData?.data) {
7877
const course = courseData.data.find((c: CourseData) => c.courseId === courseId);
7978
if (course?.thumbnailUrl) {
79+
// ์ธ๋„ค์ผ URL์ด ์ƒ๋Œ€ ๊ฒฝ๋กœ์ธ ๊ฒฝ์šฐ ์ ˆ๋Œ€ URL๋กœ ๋ณ€ํ™˜
80+
if (course.thumbnailUrl.startsWith('/')) {
81+
return `${window.location.origin}${course.thumbnailUrl}`;
82+
}
83+
// ์ด๋ฏธ ์ ˆ๋Œ€ URL์ธ ๊ฒฝ์šฐ ๊ทธ๋Œ€๋กœ ๋ฐ˜ํ™˜
8084
return course.thumbnailUrl;
8185
}
8286
}
8387
}
84-
85-
return DefaultThumbnailSrc;
88+
89+
return `${window.location.origin}/thumbnail-default.png`;
8690
};
8791

8892
if (loading) {

โ€Žsrc/utils/kakao.tsโ€Ž

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,33 @@ interface KakaoShareProps {
2727
}
2828

2929
export const shareToKakao = ({ title, description, imageUrl, webUrl }: KakaoShareProps) => {
30+
console.log('์นด์นด์˜ค SDK ๊ณต์œ  ํ˜ธ์ถœ:', { title, description, imageUrl, webUrl });
31+
console.log('์นด์นด์˜ค SDK ์ดˆ๊ธฐํ™” ์ƒํƒœ:', window.Kakao?.isInitialized());
32+
3033
if (!window.Kakao || !window.Kakao.isInitialized()) {
3134
console.error('์นด์นด์˜ค SDK๊ฐ€ ์ดˆ๊ธฐํ™”๋˜์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค.');
3235
return;
3336
}
3437

38+
// ์ด๋ฏธ์ง€ URL ๊ฒ€์ฆ
39+
if (!imageUrl || imageUrl === '') {
40+
console.error('์ด๋ฏธ์ง€ URL์ด ๋น„์–ด์žˆ์Šต๋‹ˆ๋‹ค.');
41+
return;
42+
}
43+
44+
console.log('์นด์นด์˜ค ๊ณต์œ  ์š”์ฒญ ๋ฐ์ดํ„ฐ:', {
45+
objectType: 'feed',
46+
content: {
47+
title: title,
48+
description: description,
49+
imageUrl: imageUrl,
50+
link: {
51+
mobileWebUrl: webUrl,
52+
webUrl: webUrl,
53+
},
54+
}
55+
});
56+
3557
window.Kakao.Share.sendDefault({
3658
objectType: 'feed',
3759
content: {

0 commit comments

Comments
ย (0)