Skip to content

Commit

Permalink
Merge pull request #114 from EFUB4-Jukebox/dev
Browse files Browse the repository at this point in the history
main 브랜치로 merge
  • Loading branch information
Ravende authored Aug 21, 2024
2 parents 4f4efd1 + b808971 commit 4759a68
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/MusicSearchPage/MusicInfoPinPreview.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ const MusicInfoPinPreview = ({ pin, onSelectedLocation = () => {} }) => {
>
{visibility === "PRIVATE" && <SecretPin src={lockIcon} />}
{visibility === "PRIVATE" && !isMine
? "비공개 메모입니다"
? "비공개 메모입니다."
: displayText}
{showMoreBtn && isTruncated && (
<MoreBtn onClick={toggleTruncation}> ...더보기</MoreBtn>
Expand Down
5 changes: 4 additions & 1 deletion src/components/MyPage/PinMemoComponent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ const PinMemoComponent = ({
setIsTruncated(!isTruncated);
};

const text = memo || "메모가 비어 있습니다";
const text =
visibility === "PUBLIC"
? memo || "메모가 비어 있습니다"
: "비공개 메모입니다.";
const maxLines = 2;
const showMoreBtn = text.split("\n").length > maxLines;
const displayText = isTruncated
Expand Down
14 changes: 13 additions & 1 deletion src/components/PlaylistPage/PinComponent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,19 @@ const PinComponent = ({
if (selectable) {
onSelect(pin.playlistPinId);
} else {
navigate(`/details-song/${pin.songInfo.songId}`);
const path = window.location.pathname;
const segments = path.split("/").filter(segment => segment); // 빈 문자열을 필터링

const firstSegment = segments[0] || "";
const secondSegment = segments[1] || "";

const combinedSegments = secondSegment
? `${firstSegment}/${secondSegment}`
: firstSegment;

navigate(`/details-song/${pin.songInfo.songId}`, {
state: `/${combinedSegments}`,
});
}
};
const getGenreIcon = genreName => {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/IntroducePage/Main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const BackgroundWrapper = styled.div`
z-index: 0;
`;
const Wrapper = styled.div`
width: 100vw;
min-width: 1920px;
position: relative;
z-index: 1;
`;
Expand Down

0 comments on commit 4759a68

Please sign in to comment.