Skip to content

Commit

Permalink
chore: #6 Fragment -> Screen 네이밍 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Hyobeen-Park committed May 2, 2024
1 parent e8557ea commit d5e382f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp

@Composable
fun HomeFragment(nickname: String?, mbti: String?){
fun HomeScreen(nickname: String?, mbti: String?){
val homeViewModel = HomeViewModel()
val friendsList = homeViewModel.getFriendsData()

Expand Down
10 changes: 5 additions & 5 deletions app/src/main/java/com/sopt/now/compose/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class MainActivity : ComponentActivity() {
modifier = Modifier.fillMaxSize(),
color = MaterialTheme.colorScheme.background
) {
HomeScreen()
MainScreen()
}
}
}
Expand All @@ -56,7 +56,7 @@ class MainActivity : ComponentActivity() {
@OptIn(ExperimentalMaterial3Api::class)
@Preview(showBackground = true)
@Composable
private fun HomeScreen() {
private fun MainScreen() {
var selectedItem by remember { mutableIntStateOf(0) }
val items = listOf(
BottomNavigationItem(
Expand Down Expand Up @@ -105,13 +105,13 @@ class MainActivity : ComponentActivity() {
verticalArrangement = Arrangement.spacedBy(16.dp)
) {
when (selectedItem) {
0 -> HomeFragment(
0 -> HomeScreen(
intent.getStringExtra("nickname"),
intent.getStringExtra("mbti")
)

1 -> SearchFragment()
2 -> MypageFragment(
1 -> SearchScreen()
2 -> MypageScreen(
intent.getStringExtra("id"),
intent.getStringExtra("pw"),
intent.getStringExtra("nickname"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp

@Composable
fun MypageFragment(id: String? = "", pw: String? = "", nickname: String? = "", mbti: String? = "") {
fun MypageScreen(id: String? = "", pw: String? = "", nickname: String? = "", mbti: String? = "") {
Column(
modifier = Modifier
.padding(horizontal = 40.dp)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import androidx.compose.material3.Text
import androidx.compose.runtime.Composable

@Composable
fun SearchFragment(){
fun SearchScreen(){
Text("Search")
}

0 comments on commit d5e382f

Please sign in to comment.