fix(age-setting): 국가별 연령제한 노출 조건을 통일한다
This commit is contained in:
@@ -33,6 +33,14 @@ struct LiveRoomCreateView: View {
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
let normalizedCountryCode = UserDefaults
|
||||
.string(forKey: .countryCode)
|
||||
.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||
.uppercased()
|
||||
let isKoreanCountry = normalizedCountryCode.isEmpty || normalizedCountryCode == "KR"
|
||||
let isAdultContentVisible = UserDefaults.isAdultContentVisible()
|
||||
let shouldShowAdultSetting = isAdultContentVisible && (!isKoreanCountry || UserDefaults.bool(forKey: .auth))
|
||||
|
||||
BaseView(isLoading: $viewModel.isLoading) {
|
||||
GeometryReader { proxy in
|
||||
ZStack {
|
||||
@@ -175,7 +183,7 @@ struct LiveRoomCreateView: View {
|
||||
.frame(width: screenSize().width - 26.7)
|
||||
.padding(.top, 33.3)
|
||||
|
||||
if UserDefaults.bool(forKey: .auth) {
|
||||
if shouldShowAdultSetting {
|
||||
AdultSettingView()
|
||||
.frame(width: screenSize().width - 26.7)
|
||||
.padding(.top, 33.3)
|
||||
|
||||
Reference in New Issue
Block a user