Skip to content

Commit

Permalink
#25 컨트리뷰터 화면 ViewModel 연결
Browse files Browse the repository at this point in the history
  • Loading branch information
wisemuji committed Jul 9, 2023
1 parent 28ea070 commit 6ac9885
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
Expand All @@ -20,8 +21,22 @@ import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.hilt.navigation.compose.hiltViewModel
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.droidknights.app2023.core.domain.contributor.Contributor

@Composable
fun ContributorRoute(
modifier: Modifier = Modifier,
viewModel: ContributorViewModel = hiltViewModel(),
) {
val uiState by viewModel.uiState.collectAsStateWithLifecycle()

ContributorScreen(
uiState = uiState,
modifier = modifier,
)
}

@Composable
internal fun ContributorScreen(
Expand Down

0 comments on commit 6ac9885

Please sign in to comment.