Skip to content

Commit 905ee27

Browse files
committed
[FE] Refactor : 리플로우 최적화
1 parent ffc5107 commit 905ee27

File tree

5 files changed

+18
-16
lines changed

5 files changed

+18
-16
lines changed

frontend/src/components/Common/BoxItem/index.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ function BoxItem({ trackData, imgUrl, target, next, id }: IBoxItemProps) {
2323

2424
<ButtonsWrapper className="buttons-wrapper">
2525
<BoxPlayButton />
26-
<BsThreeDots size={24} />
26+
<DotsButtonWrapper>
27+
<BsThreeDots size={24} />
28+
</DotsButtonWrapper>
2729
</ButtonsWrapper>
2830
<BoxDropdown trackData={trackData} type={next} id={id} />
2931
</Wrapper>
@@ -44,12 +46,15 @@ const ButtonsWrapper = styled.div`
4446
height: 18%;
4547
display: flex;
4648
align-items: flex-end;
47-
justify-content: space-between;
48-
transition: 0.5s all;
4949
opacity: 0;
5050
background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.15));
5151
`;
5252

53+
const DotsButtonWrapper = styled.div`
54+
position: absolute;
55+
right: 12px;
56+
`;
57+
5358
const Wrapper = styled.div`
5459
width: 100%;
5560
height: 100%;

frontend/src/components/Common/Button/BoxPlayButton.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ const ButtonWrapper = styled.button`
2929
align-items: center;
3030
box-sizing: border-box;
3131
border: none;
32+
position: absolute;
33+
will-change: transform;
3234
&:hover {
3335
opacity: 100%;
3436
transform: scale(1.1);

frontend/src/components/Common/MagTopItem/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ const MagContent = styled.p`
7777
font-size: 14px;
7878
line-height: 20px;
7979
color: #939393;
80-
will-change: transform;
8180
`;
8281

8382
const Wrapper = styled.div`

frontend/src/components/MagList/index.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ import MagLargeCard from '@components/Common/Card/MagLargeCard';
66
const MagList = ({ magList }) => {
77
return (
88
<ListContainer>
9-
{magList && magList?.map((track, index) => (
10-
<>
11-
{index > 0 && (<DivdieContainer />)}
12-
<MagLargeCard key={track.id} data={track}/>
13-
</>
14-
))}
9+
{magList &&
10+
magList?.map((track, index) => (
11+
<>
12+
{index > 0 && <DivdieContainer />}
13+
<MagLargeCard key={track.id} data={track} />
14+
</>
15+
))}
1516
</ListContainer>
1617
);
1718
};

frontend/src/pages/Detail/Magazine/index.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,7 @@ function MagazineDetail({ magazineInfo: magazine }: IMagazineInfoProps) {
3232
<MagTitle>{magazine?.title}</MagTitle>
3333
<MagContent>{magazine?.content}</MagContent>
3434
<MagPlayList>
35-
<MagPlayListInfo>
36-
{magazine?.tracks?.length}
37-
38-
{' '}
39-
</MagPlayListInfo>
35+
<MagPlayListInfo>{magazine?.tracks?.length}</MagPlayListInfo>
4036
<MagPlayListLink>플레이리스트 보기</MagPlayListLink>
4137
</MagPlayList>
4238
<MagPlayButtonList>
@@ -157,7 +153,6 @@ const MagContent = styled.h5`
157153
line-height: 26px;
158154
color: hsla(0, 0%, 100%, 0.5);
159155
white-space: pre-line;
160-
161156
::after {
162157
content: '';
163158
display: block;

0 commit comments

Comments
 (0)