-
-
-
{title}
-
-
공연 상세정보 확인하기
-
+
+ {performances.map((performance) => (
+
+

+
+
{performance.title ?? ''}
+
+
-
+ ))}
{showDots && (
-
+
)}
);
diff --git a/apps/client/src/shared/components/music-list/music-list.tsx b/apps/client/src/shared/components/music-list/music-list.tsx
index ed17a0bb..40196c2c 100644
--- a/apps/client/src/shared/components/music-list/music-list.tsx
+++ b/apps/client/src/shared/components/music-list/music-list.tsx
@@ -7,8 +7,8 @@ import * as styles from './music-list.css';
interface Music {
musicId: string;
- artworkUrl: string;
trackName: string;
+ artworkUrl: string;
artistName: string;
isPlaying?: boolean;
progress?: number;
diff --git a/apps/client/src/shared/components/music-list/skeleton-info.tsx b/apps/client/src/shared/components/music-list/skeleton-info.tsx
new file mode 100644
index 00000000..ee755641
--- /dev/null
+++ b/apps/client/src/shared/components/music-list/skeleton-info.tsx
@@ -0,0 +1,25 @@
+import { Skeleton } from '@confeti/design-system';
+import { Icon } from '@confeti/design-system/icon';
+
+import * as styles from './music-info.css';
+
+const SkeletonInfo = () => {
+ return (
+
+ );
+};
+
+export default SkeletonInfo;
diff --git a/apps/client/src/shared/constants/api.ts b/apps/client/src/shared/constants/api.ts
index 8bb1444a..43c958a2 100644
--- a/apps/client/src/shared/constants/api.ts
+++ b/apps/client/src/shared/constants/api.ts
@@ -50,7 +50,8 @@ export const END_POINT = {
GET_TICKETING: '/performances/reservation',
GET_LATEST_PERFORMANCES: '/performances/info',
GET_SUGGEST_PERFORMANCE: '/performances/recommend',
- GET_SUGGEST_MUSIC_PERFORMANCE: '/performances/recommend/performance',
+ GET_SUGGEST_MUSIC_PERFORMANCE: (performanceSize: number, songSize: number) =>
+ `performances/v4/song/recommend?performanceSize=${performanceSize}&songSize=${songSize}`,
//타임 테이블
GET_AVAILABLE_FESTIVALS: '/user/timetables/festivals',
diff --git a/apps/client/src/shared/constants/query-key.ts b/apps/client/src/shared/constants/query-key.ts
index 8594f524..25a10996 100644
--- a/apps/client/src/shared/constants/query-key.ts
+++ b/apps/client/src/shared/constants/query-key.ts
@@ -31,10 +31,11 @@ export const HOME_QUERY_KEY = {
LATEST_PERFORMANCES: () => [...HOME_QUERY_KEY.ALL, 'latest-performances'],
TICKETING: () => [...HOME_QUERY_KEY.ALL, 'ticketing'],
SUGGEST_PERFORMANCE: () => [...HOME_QUERY_KEY.ALL, 'suggest-performance'],
- SUGGEST_MUSIC_PERFORMANCE: () => [...HOME_QUERY_KEY.ALL, 'suggest-music'],
- SUGGEST_MUSIC: (performanceId: number) => [
+ RECOMMEND_PERFORMANCES: (performanceSize: number, songSize: number) => [
...HOME_QUERY_KEY.ALL,
- performanceId,
+ 'recommend-performances',
+ performanceSize,
+ songSize,
],
} as const;
diff --git a/apps/client/src/shared/hooks/use-music-player.ts b/apps/client/src/shared/hooks/use-music-player.ts
index b6f9b1f3..d56030a8 100644
--- a/apps/client/src/shared/hooks/use-music-player.ts
+++ b/apps/client/src/shared/hooks/use-music-player.ts
@@ -10,10 +10,11 @@ export const useMusicPlayer = (data: musics[]) => {
const [duration, setDuration] = useState(30);
const stopAudio = () => {
- const audio = audioRef.current;
- if (!audio) return;
- audio.pause();
- audio.currentTime = 0;
+ if (!audioRef.current) return;
+
+ audioRef.current.pause();
+ audioRef.current.currentTime = 0;
+
setCurrentPlayingId(null);
setIsAudioPlaying(false);
setCurrentTime(0);
@@ -24,35 +25,33 @@ export const useMusicPlayer = (data: musics[]) => {
if (!selectedMusic || !selectedMusic.previewUrl || !audioRef.current)
return;
- const audio = audioRef.current;
-
- if (currentPlayingId === musicId && !audio.paused) {
+ if (currentPlayingId === musicId && !audioRef.current.paused) {
stopAudio();
return;
}
- audio.src = selectedMusic.previewUrl;
- audio.play().catch((e) => console.error('재생 오류', e));
+ audioRef.current.src = selectedMusic.previewUrl;
+ audioRef.current.play().catch((e) => console.error('재생 오류', e));
setCurrentPlayingId(musicId);
};
const audioEvents = useMemo(
() => ({
onLoadedMetadata: () => {
- const a = audioRef.current;
- if (!a) return;
- const d = Number.isFinite(a.duration) ? a.duration : 30;
+ if (!audioRef.current) return;
+
+ const d = Number.isFinite(audioRef.current.duration)
+ ? audioRef.current.duration
+ : 30;
setDuration(d);
},
onTimeUpdate: () => {
- const a = audioRef.current;
- if (!a) return;
- setCurrentTime(a.currentTime);
+ if (!audioRef.current) return;
+ setCurrentTime(audioRef.current.currentTime);
},
onSeeked: () => {
- const a = audioRef.current;
- if (!a) return;
- setCurrentTime(a.currentTime);
+ if (!audioRef.current) return;
+ setCurrentTime(audioRef.current.currentTime);
},
onPlay: () => {
setIsAudioPlaying(true);
diff --git a/apps/client/src/shared/pages/error/error.css.ts b/apps/client/src/shared/pages/error/error.css.ts
index b22caedc..8ca6933a 100644
--- a/apps/client/src/shared/pages/error/error.css.ts
+++ b/apps/client/src/shared/pages/error/error.css.ts
@@ -5,7 +5,7 @@ import { themeVars } from '@confeti/design-system/styles';
export const container = style({
...themeVars.display.flexJustifyAlignCenter,
flexDirection: 'column',
- height: 'calc(100dvh - 14rem)',
+ flex: 1,
gap: '2rem',
});
diff --git a/apps/client/src/shared/types/home-response.ts b/apps/client/src/shared/types/home-response.ts
index 8fa1e28f..55c5b805 100644
--- a/apps/client/src/shared/types/home-response.ts
+++ b/apps/client/src/shared/types/home-response.ts
@@ -63,3 +63,23 @@ export interface SuggestMusicPerformanceResponse {
export interface SuggestMusicResponse {
musics: musics[];
}
+
+export interface RecommendSong {
+ songId: string;
+ songName: string;
+ artistName: string;
+ artworkUrl: string;
+ previewUrl: string;
+}
+
+export interface RecommendPerformances {
+ typeId: number;
+ type: 'concert' | 'festival';
+ title: string;
+ posterUrl: string;
+ songs: RecommendSong[];
+}
+
+export interface RecommendPerformancesResponse {
+ performances: RecommendPerformances[];
+}
diff --git a/packages/design-system/src/components/music-item/music-item.css.ts b/packages/design-system/src/components/music-item/music-item.css.ts
index 9d5f0134..6cacd758 100644
--- a/packages/design-system/src/components/music-item/music-item.css.ts
+++ b/packages/design-system/src/components/music-item/music-item.css.ts
@@ -157,15 +157,18 @@ export const playerTransparent = style({
export const progressSvg = style({
position: 'absolute',
- inset: '-1.5px',
- transform: 'rotate(-90deg)',
+ width: '44px',
+ height: '44px',
+ top: '50%',
+ left: '50%',
+ transform: 'translate(-50%, -50%) rotate(-90deg)',
pointerEvents: 'none',
});
export const progressCircle = style({
fill: 'none',
stroke: themeVars.color.confeti_lime,
- strokeWidth: 1,
+ strokeWidth: 2,
strokeDasharray: `${CIRC}`,
strokeDashoffset: `${CIRC}`,
transition: 'stroke-dashoffset 0.25s linear',