fix(content): 성인 콘텐츠 설정 동기화와 국가별 인증 분기를 적용한다

This commit is contained in:
Yu Sung
2026-03-27 17:34:02 +09:00
parent 44daabdcae
commit 1d120b58bd
24 changed files with 1029 additions and 133 deletions

View File

@@ -21,6 +21,12 @@ struct MyPageView: View {
@AppStorage("token") private var token: String = UserDefaults.string(forKey: UserDefaultsKey.token)
var body: some View {
let normalizedCountryCode = UserDefaults
.string(forKey: .countryCode)
.trimmingCharacters(in: .whitespacesAndNewlines)
.uppercased()
let isKoreanCountry = normalizedCountryCode.isEmpty || normalizedCountryCode == "KR"
BaseView(isLoading: $viewModel.isLoading) {
if !token.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty &&
viewModel.isShowAuthView {
@@ -114,6 +120,7 @@ struct MyPageView: View {
CategoryButtonsView(
isShowAuthView: $viewModel.isShowAuthView,
isAuthenticated: viewModel.isAuth,
isKoreanCountry: isKoreanCountry,
showMessage: {
viewModel.errorMessage = $0
viewModel.isShowPopup = true
@@ -381,6 +388,7 @@ struct CategoryButtonsView: View {
@Binding var isShowAuthView: Bool
let isAuthenticated: Bool
let isKoreanCountry: Bool
let showMessage: (String) -> Void
let refresh: () -> Void
@@ -420,12 +428,14 @@ struct CategoryButtonsView: View {
AppState.shared.setAppStep(step: .serviceCenter)
}
CategoryButtonItem(
icon: "ic_my_auth",
title: isAuthenticated ? "인증완료" : "본인인증"
) {
if !isAuthenticated {
isShowAuthView = true
if isKoreanCountry {
CategoryButtonItem(
icon: "ic_my_auth",
title: isAuthenticated ? "인증완료" : "본인인증"
) {
if !isAuthenticated {
isShowAuthView = true
}
}
}
}