Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions AIProject/iCo/Features/MyPage/View/AlarmView.swift

This file was deleted.

3 changes: 3 additions & 0 deletions AIProject/iCo/Features/MyPage/View/Main/MyPageMenu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import Foundation

enum MyPageMenu: String, Hashable, Identifiable {
case bookmark
case updateRiskTolerance
case themeSet
case feedback

Expand All @@ -17,6 +18,7 @@ enum MyPageMenu: String, Hashable, Identifiable {
var title: String {
switch self {
case .bookmark: return "북마크 관리"
case .updateRiskTolerance: return "투자 성향 변경"
case .themeSet: return "테마 변경"
case .feedback: return "이메일 문의"
}
Expand All @@ -25,6 +27,7 @@ enum MyPageMenu: String, Hashable, Identifiable {
var icon: String {
switch self {
case .bookmark: return "bookmark"
case .updateRiskTolerance: return "dial.medium"
case .themeSet: return "paintpalette"
case .feedback: return "at"
}
Expand Down
4 changes: 3 additions & 1 deletion AIProject/iCo/Features/MyPage/View/Main/MyPageView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ struct MyPageView: View {
switch selection {
case .bookmark:
BookmarkView(coinStore: coinStore)
case .updateRiskTolerance:
UpdateRiskToleranceView()
case .themeSet:
ThemeView()
case .feedback:
Expand All @@ -58,7 +60,7 @@ struct MyPageView: View {
List(selection: $selection) {
VStack {
Section {
ForEach([MyPageMenu.bookmark, .themeSet]) { menu in
ForEach([MyPageMenu.bookmark, .updateRiskTolerance, .themeSet]) { menu in
MyPageMenuRow(title: menu.title, imageName: menu.icon)
.contentShape(.rect)
.onTapGesture {
Expand Down
38 changes: 38 additions & 0 deletions AIProject/iCo/Features/MyPage/View/UpdateRiskToleranceView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
//
// UpdateRiskToleranceView.swift
// iCo
//
// Created by 지현 on 10/21/25.
//

import SwiftUI

struct UpdateRiskToleranceView: View {
@AppStorage(AppStorageKey.investmentType) private var storedInvestmentType: String = ""
@State private var selectedType: RiskTolerance?

var body: some View {
ScrollView {
VStack(spacing: 0) {
SubheaderView(subheading: "나의 투자 성향 조정")
.padding(.bottom, 16)

VStack(spacing: 16) {
ForEach(RiskTolerance.allCases, id: \.self) { type in
RoundedRectangleFillButton(title: type.rawValue,
isHighlighted: Binding(get: { storedInvestmentType == type.rawValue }, set: { _ in })) {
withAnimation(.snappy) { storedInvestmentType = type.rawValue }
}
}
}
.padding(.horizontal, .spacing)
}
}
.interactiveSwipeBackEnabled()
.scrollIndicators(.hidden)
}
}

#Preview {
UpdateRiskToleranceView()
}
3 changes: 0 additions & 3 deletions AIProject/iCo/Features/Onboarding/LastOnboardingPage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ import SwiftUI
/// - isLandscape: 가로/세로 레이아웃 여부를 나타내는 바인딩 값
/// - onFinish: 온보딩 완료 시 호출되는 콜백
struct LastOnboardingPage: View {
@EnvironmentObject var recommendCoinViewModel: RecommendCoinViewModel

@AppStorage(AppStorageKey.investmentType) private var storedInvestmentType: String = ""

@State private var selectedType: RiskTolerance?
Expand Down Expand Up @@ -74,5 +72,4 @@ struct LastOnboardingPage: View {

#Preview {
LastOnboardingPage(isLandscape: .constant(true), onFinish: { })
.environmentObject(RecommendCoinViewModel())
}
Loading