Skip to content

Commit

Permalink
Merge pull request #187 from SOPT-all/fix/#186-lock-register-button
Browse files Browse the repository at this point in the history
[FIX/#186] 게시물 등록 중복 요청 수정
  • Loading branch information
angryPodo authored Jan 24, 2025
2 parents 0027fb5 + bc840f3 commit ca00ffc
Showing 1 changed file with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,23 @@ import com.spoony.spoony.core.designsystem.type.ButtonStyle
@Composable
fun NextButton(
enabled: Boolean,
modifier: Modifier = Modifier,
onClick: () -> Unit
onClick: () -> Unit,
modifier: Modifier = Modifier
) {
var isClicked by remember { mutableStateOf(false) }

SpoonyButton(
text = "다음",
size = ButtonSize.Xlarge,
style = ButtonStyle.Primary,
modifier = modifier.fillMaxWidth(),
enabled = enabled,
onClick = onClick
enabled = enabled && !isClicked,
onClick = {
if (!isClicked) {
isClicked = true
onClick()
}
}
)
}

Expand Down

0 comments on commit ca00ffc

Please sign in to comment.