Skip to content

Commit fa7bf69

Browse files
authored
Merge pull request #236 from APPS-sookmyung/dev
[MERGE] dev to main
2 parents 6b12454 + ac858b4 commit fa7bf69

File tree

5 files changed

+27
-11
lines changed

5 files changed

+27
-11
lines changed

src/components/CardInfo/CardInfo.jsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import * as S from './CardInfo.style';
77
export default function CardInfo({
88
id,
99
name,
10+
company,
1011
position,
1112
department,
1213
imageUrl,
@@ -31,18 +32,23 @@ export default function CardInfo({
3132
<S.Info>
3233
<S.Name isSelected={isSelected}>{name}</S.Name>
3334
<S.Role isSelected={isSelected}>
34-
{department} {department && position ? `/ ${position}` : position}
35+
{`${company || ''}${company && (department || position) ? ' / ' : ''}${department || ''}${department && position ? ' / ' : ''}${position || ''}`}
3536
</S.Role>
3637
</S.Info>
3738
</S.CardWrapper>
3839
{!isDeleteMode && (
3940
<S.ArrowIconWrapper>
40-
<Icon id='arrow-right' fill='none' width={13} height={13}/>
41+
<Icon id='arrow-right' fill='none' width={13} height={13} />
4142
</S.ArrowIconWrapper>
4243
)}
4344
{isDeleteMode && (
4445
<S.ArrowIconWrapper>
45-
<Icon id={isSelected ? 'circle-check' : 'circle'} fill='none' width={16} height={16}/>
46+
<Icon
47+
id={isSelected ? 'circle-check' : 'circle'}
48+
fill='none'
49+
width={16}
50+
height={16}
51+
/>
4652
</S.ArrowIconWrapper>
4753
)}
4854
</S.Card>

src/pages/CardDetailPage/CardDetailPage.style.jsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,12 @@ export const CardImageContainer = styled.div`
204204
export const CardImageBox = styled.div`
205205
overflow: hidden;
206206
border-radius: 10px;
207-
207+
width: calc(50% - 10px);
208+
aspect-ratio: 9 / 5;
209+
max-width: 270px;
208210
img {
209-
width: 100px;
210-
height: 100px;
211+
width: 100%;
212+
height: 100%;
211213
object-fit: cover;
212214
}
213215
`;

src/pages/DetailEditPage/DetailEditPage.style.jsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,10 +297,13 @@ export const CardImageBox = styled.div`
297297
position: relative;
298298
overflow: hidden;
299299
border-radius: 10px;
300+
width: calc(50% - 10px);
301+
max-width: 270px;
302+
aspect-ratio: 9 / 5;
300303
301304
img {
302-
width: 100px;
303-
height: 100px;
305+
width: 100%;
306+
height: 100%;
304307
object-fit: cover;
305308
}
306309
`;

src/pages/HomePage/HomePage.jsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ export default function HomePage() {
1212
const [myCardData, setMyCardData] = useState([]);
1313
const [cardsData, setCardsData] = useState([]);
1414
const [myCardId, setMyCardId] = useState(null);
15-
useVisibleCardsEffect(setVisibleList, cardsData);
15+
16+
useVisibleCardsEffect(
17+
setVisibleList,
18+
cardsData.sort((a, b) => b.id - a.id)
19+
);
1620

1721
async function fetchMyCard() {
1822
try {
@@ -97,6 +101,7 @@ export default function HomePage() {
97101
<CardInfo
98102
id={data.id}
99103
name={data.name}
104+
company={data.company}
100105
position={data.position}
101106
department={data.department}
102107
imageUrl={data.profImgUrl}

src/pages/ViewCardPage/ViewCardPage.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ export default function ViewCardPage() {
131131
return searchData.filter((data) => data.category === activeBadge?.name);
132132
};
133133

134-
const displayData = getDisplayData();
134+
const displayData = getDisplayData().sort((a, b) => b.id - a.id);
135135

136136
return (
137137
<>
@@ -170,9 +170,9 @@ export default function ViewCardPage() {
170170
id={data.id}
171171
key={data.id}
172172
name={data.name}
173+
company={data.company}
173174
position={data.position}
174175
department={data.department}
175-
company={data.company}
176176
imageUrl={data.profImgUrl}
177177
isDeleteMode={isDeleteMode}
178178
isSelected={selectedCards.includes(data.id)}

0 commit comments

Comments
 (0)