File tree Expand file tree Collapse file tree 5 files changed +27
-11
lines changed
Expand file tree Collapse file tree 5 files changed +27
-11
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import * as S from './CardInfo.style';
77export 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 >
Original file line number Diff line number Diff line change @@ -204,10 +204,12 @@ export const CardImageContainer = styled.div`
204204export 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` ;
Original file line number Diff line number Diff 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` ;
Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff 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 ) }
You can’t perform that action at this time.
0 commit comments