Skip to content

Commit

Permalink
Merge pull request #32 from MONEYMONG/feature/MONEYMONG-508
Browse files Browse the repository at this point in the history
Feature/moneymong 508 대학 정보가 없어도 동아리, 학생회 생성 가능 수정
  • Loading branch information
jhg3410 authored Sep 24, 2024
2 parents db9d096 + 3adf8a6 commit 5f6ecc1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import androidx.compose.ui.draw.clip
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import com.moneymong.moneymong.design_system.theme.Body3
import com.moneymong.moneymong.design_system.theme.Body2

@Composable
fun MDSButton(
Expand All @@ -38,10 +38,10 @@ fun MDSButton(
modifier = modifier
.background(
color = backgroundColor,
shape = RoundedCornerShape(12.dp)
shape = RoundedCornerShape(10.dp)
)
.clip(
RoundedCornerShape(12.dp)
RoundedCornerShape(10.dp)
)
.clickable(
onClick = onClick,
Expand All @@ -58,7 +58,7 @@ fun MDSButton(
) {
if (iconResource != null) {
Icon(
modifier = Modifier.size(20.dp),
modifier = Modifier.size(18.dp),
painter = painterResource(id = iconResource),
contentDescription = "Button icon",
tint = contentColor
Expand All @@ -67,7 +67,7 @@ fun MDSButton(
Text(
text = text,
color = contentColor,
style = Body3,
style = Body2,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.moneymong.moneymong.design_system.component.navigation

import android.graphics.BlurMaskFilter
import androidx.annotation.DrawableRes
import androidx.compose.foundation.background
import androidx.compose.foundation.interaction.MutableInteractionSource
Expand All @@ -22,9 +21,6 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.drawBehind
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.graphics.Paint
import androidx.compose.ui.graphics.drawscope.drawIntoCanvas
import androidx.compose.ui.graphics.toArgb
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
Expand All @@ -33,7 +29,6 @@ import com.moneymong.moneymong.design_system.component.navigation.MDSNavigationB
import com.moneymong.moneymong.design_system.component.navigation.MDSNavigationBarItemDefaults.selectedLabelColor
import com.moneymong.moneymong.design_system.component.navigation.MDSNavigationBarItemDefaults.unSelectedIconColor
import com.moneymong.moneymong.design_system.component.navigation.MDSNavigationBarItemDefaults.unSelectedLabelColor
import com.moneymong.moneymong.design_system.theme.Black
import com.moneymong.moneymong.design_system.theme.Blue04
import com.moneymong.moneymong.design_system.theme.Body2
import com.moneymong.moneymong.design_system.theme.Gray02
Expand All @@ -49,7 +44,6 @@ fun MDSNavigationBar(
modifier = modifier
.fillMaxWidth()
.navigationBarsPadding()
.navigationBarShadow()
.background(color = White)
.drawBehind {
val strokeWidth = 1.dp.toPx()
Expand All @@ -66,32 +60,6 @@ fun MDSNavigationBar(
)
}

private fun Modifier.navigationBarShadow(): Modifier {
val shadowOffsetY = (-4).dp
val shadowBlurRadius = 8.dp
val shadowColor = Black.copy(alpha = 0.04f).toArgb()

return this.drawBehind {
drawIntoCanvas { canvas ->
val paint = Paint()
val frameworkPaint = paint.asFrameworkPaint()
frameworkPaint.color = shadowColor
frameworkPaint.maskFilter = BlurMaskFilter(
shadowBlurRadius.toPx(),
BlurMaskFilter.Blur.NORMAL
)

canvas.drawRect(
left = 0f,
top = shadowOffsetY.toPx(),
right = size.width,
bottom = size.height + shadowOffsetY.toPx(),
paint = paint
)
}
}
}


@Composable
fun RowScope.MDSNavigationBarItem(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.moneymong.moneymong.model.sign

data class UnivResponse(
val universityName: String?,
val universityName: String,
val grade: Int
)
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class AgencySearchViewModel @Inject constructor(
isLoading = false,
joinedAgencies = fetchMyAgenciesResult.getOrThrow()
.map { myAgencyResponse -> myAgencyResponse.toAgency() },
isUniversityStudent = fetchMyUniversityResult.getOrThrow().universityName != null,
isUniversityStudent = fetchMyUniversityResult.getOrThrow().universityName.isNotBlank(),
)
}
} else {
Expand Down

0 comments on commit 5f6ecc1

Please sign in to comment.