Skip to content

Commit

Permalink
[chore] : reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
ham2174 committed Jan 29, 2024
1 parent c31f6ce commit e63cdae
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 28 deletions.
6 changes: 1 addition & 5 deletions app/src/main/java/com/moya/funch/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,8 @@ import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import com.moya.funch.theme.FunchTheme
import com.moya.funch.theme.LocalBackgroundTheme
import com.moya.funch.ui.FunchApp
Expand All @@ -32,7 +28,7 @@ class MainActivity : ComponentActivity() {
onSearchClick = {},
myCode = "",
onMyProfileClick = {},
viewCount = 12
viewCount = 12,
)
}
}
Expand Down
33 changes: 10 additions & 23 deletions app/src/main/java/com/moya/funch/ui/FunchApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ import com.moya.funch.theme.White
import com.moya.funch.theme.Yellow500

private val brush = Brush.horizontalGradient(
0.5f to Lemon500,
0.5f to Color(0xFFFFD440)
0.5f to Lemon500, 0.5f to Color(0xFFFFD440)
)

@Composable
Expand Down Expand Up @@ -82,8 +81,7 @@ fun FunchApp(
horizontalArrangement = Arrangement.spacedBy(8.dp),
) {
CodeCard(
modifier = Modifier.weight(1f),
myCode = myCode
modifier = Modifier.weight(1f), myCode = myCode
)
MyProfileCard(
onMyProfileClick = onMyProfileClick
Expand Down Expand Up @@ -133,23 +131,17 @@ private fun MatchingCard(
.fillMaxWidth()
.height(178.dp)
.border(
width = 1.dp,
brush = brush,
shape = RoundedCornerShape(20.dp)
width = 1.dp, brush = brush, shape = RoundedCornerShape(20.dp)
)
.clip(RoundedCornerShape(20.dp))
.background(Gray800)
.padding(
top = 24.dp,
bottom = 33.dp,
start = 16.dp,
end = 16.dp
top = 24.dp, bottom = 33.dp, start = 16.dp, end = 16.dp
),
verticalArrangement = Arrangement.spacedBy(space = 16.dp),
) {
Text(text = annotatedString)
FunchButtonTextField(
backgroundColor = Gray700,
FunchButtonTextField(backgroundColor = Gray700,
value = value,
onValueChange = onValueChange,
hint = stringResource(id = R.string.matching_card_hint),
Expand All @@ -165,8 +157,7 @@ private fun MatchingCard(
tint = Yellow500,
),
)
}
)
})
}
}

Expand Down Expand Up @@ -205,8 +196,7 @@ private fun CodeCard(
Row(
modifier = modifier
.background(
color = Gray800,
shape = FunchTheme.shapes.medium
color = Gray800, shape = FunchTheme.shapes.medium
)
.padding(
top = 24.dp,
Expand Down Expand Up @@ -238,8 +228,7 @@ private fun MyProfileCard(
)
.clickable(onClick = onMyProfileClick)
.padding(
vertical = 12.5f.dp,
horizontal = 24.dp
vertical = 12.5f.dp, horizontal = 24.dp
),
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.spacedBy(space = 8.dp),
Expand Down Expand Up @@ -292,8 +281,7 @@ private fun ProfileViewCounterCard(
modifier = Modifier
.fillMaxWidth()
.background(
color = Gray800,
shape = FunchTheme.shapes.medium
color = Gray800, shape = FunchTheme.shapes.medium
)
.padding(
top = 24.dp,
Expand All @@ -313,8 +301,7 @@ private fun ProfileViewCounterCard(
}

@Preview(
"Home UI", showBackground = true,
widthDp = 360, heightDp = 640
"Home UI", showBackground = true, widthDp = 360, heightDp = 640
)
@Composable
private fun Preview1() {
Expand Down

0 comments on commit e63cdae

Please sign in to comment.