-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[UI/#80] 탐색 뷰 / 공고 컴포넌트 추가 #81
Changes from all commits
4e7b3dc
a83db39
cf7c1d3
96069ff
89fd781
dae9254
0be09ff
12a396e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package com.terning.core.designsystem.component.item | ||
|
||
import androidx.compose.foundation.background | ||
import androidx.compose.foundation.layout.Box | ||
import androidx.compose.foundation.shape.RoundedCornerShape | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.unit.dp | ||
import com.terning.core.designsystem.theme.Grey200 | ||
import com.terning.core.designsystem.theme.White | ||
import com.terning.core.extension.customShadow | ||
|
||
@Composable | ||
fun InternItemWithShadow( | ||
imageUrl: String, | ||
title: String, | ||
dateDeadline: String, | ||
workingPeriod: String, | ||
isScraped: Boolean, | ||
) { | ||
Box( | ||
modifier = Modifier | ||
.customShadow( | ||
color = Grey200, | ||
shadowRadius = 10.dp, | ||
shadowWidth = 2.dp, | ||
) | ||
.background( | ||
color = White, | ||
shape = RoundedCornerShape(10.dp) | ||
) | ||
) { | ||
InternItem( | ||
imageUrl = imageUrl, | ||
title = title, | ||
dateDeadline = dateDeadline, | ||
workingPeriod = workingPeriod, | ||
isScraped = isScraped | ||
) | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,8 +10,8 @@ import com.terning.core.designsystem.theme.CalGreen2 | |
import com.terning.core.designsystem.theme.CalOrange1 | ||
import com.terning.core.designsystem.theme.CalPink | ||
import com.terning.core.designsystem.theme.CalYellow | ||
import com.terning.feature.home.home.model.InternData | ||
import com.terning.feature.home.home.model.InternFilterData | ||
import com.terning.feature.home.home.model.RecommendInternData | ||
import com.terning.feature.home.home.model.ScrapData | ||
import com.terning.feature.home.home.model.UserNameState | ||
import com.terning.feature.home.home.model.UserScrapState | ||
|
@@ -24,7 +24,7 @@ import javax.inject.Inject | |
class HomeViewModel @Inject constructor( | ||
|
||
) : ViewModel() { | ||
private val _userName by mutableStateOf<UserNameState>( | ||
private val _userName by mutableStateOf( | ||
UserNameState( | ||
userName = "남지우자랑스러운티엘이되", | ||
internFilter = InternFilterData( | ||
|
@@ -37,15 +37,15 @@ class HomeViewModel @Inject constructor( | |
) | ||
val userName get() = _userName | ||
|
||
private val _scrapState = MutableStateFlow<UserScrapState>( | ||
private val _scrapState = MutableStateFlow( | ||
UserScrapState( | ||
isScrapExist = true, | ||
scrapData = getScrapData() | ||
) | ||
) | ||
val scrapData get() = _scrapState.asStateFlow() | ||
|
||
private val _recommendInternState = MutableStateFlow<List<RecommendInternData>>( | ||
private val _recommendInternState = MutableStateFlow( | ||
getRecommendData() | ||
) | ||
val recommendInternData get() = _recommendInternState.asStateFlow() | ||
|
@@ -57,7 +57,6 @@ class HomeViewModel @Inject constructor( | |
fun setWorkingPeriod(workingPeriod: Int) { | ||
userName.internFilter?.workingPeriod = workingPeriod | ||
} | ||
|
||
} | ||
|
||
private fun getScrapData(): List<ScrapData> = listOf( | ||
|
@@ -111,71 +110,71 @@ private fun getScrapData(): List<ScrapData> = listOf( | |
), | ||
) | ||
|
||
private fun getRecommendData(): List<RecommendInternData> = listOf( | ||
RecommendInternData( | ||
private fun getRecommendData(): List<InternData> = listOf( | ||
InternData( | ||
imgUrl = "https://reqres.in/img/faces/7-image.jpg", | ||
title = "[유한킴벌리] 그린캠프 w.대학생 숲 활동가", | ||
dDay = 22, | ||
workingPeriod = 2, | ||
isScrapped = true, | ||
), | ||
RecommendInternData( | ||
InternData( | ||
imgUrl = "https://reqres.in/img/faces/7-image.jpg", | ||
title = "ㅇㄻㅇㅁㄻㄹㅇㅁㅇㄹ", | ||
dDay = 9, | ||
workingPeriod = 6, | ||
isScrapped = false, | ||
), | ||
RecommendInternData( | ||
InternData( | ||
imgUrl = "https://reqres.in/img/faces/7-image.jpg", | ||
title = "[유한킴벌리] 그린캠프 w.대학생 숲 활동가", | ||
dDay = 2, | ||
workingPeriod = 4, | ||
isScrapped = true, | ||
), | ||
RecommendInternData( | ||
InternData( | ||
imgUrl = "https://reqres.in/img/faces/7-image.jpg", | ||
title = "[유한킴벌리] 그린캠프 w.대학생 숲 활동가", | ||
dDay = 2, | ||
workingPeriod = 4, | ||
isScrapped = false, | ||
), | ||
RecommendInternData( | ||
InternData( | ||
imgUrl = "https://reqres.in/img/faces/7-image.jpg", | ||
title = "[유한킴벌리] 그린캠프 w.대학생 숲 활동가", | ||
dDay = 2, | ||
workingPeriod = 4, | ||
isScrapped = true, | ||
), | ||
RecommendInternData( | ||
InternData( | ||
imgUrl = "https://reqres.in/img/faces/7-image.jpg", | ||
title = "[유한킴벌리] 그린캠프 w.대학생 숲 활동가", | ||
dDay = 2, | ||
workingPeriod = 4, | ||
isScrapped = true, | ||
), | ||
RecommendInternData( | ||
InternData( | ||
imgUrl = "https://reqres.in/img/faces/7-image.jpg", | ||
title = "[유한킴벌리] 그린캠프 w.대학생 숲 활동가", | ||
dDay = 2, | ||
Comment on lines
154
to
159
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 레전드 센스쟁이 발생!! |
||
workingPeriod = 4, | ||
isScrapped = false, | ||
), | ||
RecommendInternData( | ||
InternData( | ||
imgUrl = "https://reqres.in/img/faces/7-image.jpg", | ||
title = "[유한킴벌리] 그린캠프 w.대학생 숲 활동가", | ||
dDay = 2, | ||
workingPeriod = 4, | ||
isScrapped = true, | ||
), | ||
RecommendInternData( | ||
InternData( | ||
imgUrl = "https://reqres.in/img/faces/7-image.jpg", | ||
title = "[유한킴벌리] 그린캠프 w.대학생 숲 활동가", | ||
dDay = 2, | ||
workingPeriod = 4, | ||
isScrapped = false, | ||
), | ||
RecommendInternData( | ||
InternData( | ||
imgUrl = "https://reqres.in/img/faces/7-image.jpg", | ||
title = "[유한킴벌리] 그린캠프 w.대학생 숲 활동가", | ||
dDay = 2, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,7 +54,7 @@ fun InternCompanyInfo(modifier: Modifier) { | |
) { | ||
Image( | ||
painter = painterResource( | ||
id = R.drawable.ic_nosearch | ||
id = R.drawable.ic_empty_logo | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 네이밍 굿!! |
||
), | ||
modifier = modifier.fillMaxWidth(), | ||
contentDescription = null, | ||
Comment on lines
55
to
60
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 이거 서버에서 이미지 URL로 받는 거면 coil 사용해줘야 될 것 같아요!! |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -100,5 +100,4 @@ fun SearchScreen( | |
SearchInternList(type = InternListType.SCRAP) | ||
} | ||
} | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
흠 이게 아이템마다 radius가 다를 수 있어서 component로 뺄거면 이거도 파라미터로 받아와야 할 것 같아요..!!