Mercurial > public > geoquiz
diff GeoQuiz/ContentView.swift @ 11:039b26a99a48
implementing RevenueCat
author | Dennis C. M. <dennis@denniscm.com> |
---|---|
date | Sun, 09 Oct 2022 17:02:34 +0200 |
parents | a793f33f05fb |
children | bdfff35dd43c |
line wrap: on
line diff
--- a/GeoQuiz/ContentView.swift Sat Oct 08 21:36:40 2022 +0200 +++ b/GeoQuiz/ContentView.swift Sun Oct 09 17:02:34 2022 +0200 @@ -10,12 +10,12 @@ struct ContentView: View { @State private var showingBuyPremiumModalView = false @State private var showingSettingsModalView = false + @State private var showingProfileModalView = false var body: some View { NavigationView { ScrollView(showsIndicators: false) { - VStack(alignment: .leading, spacing: 20) { - + VStack(alignment: .leading, spacing: 30) { Text("Select a game 🎮") .font(.largeTitle.bold()) .padding(.bottom) @@ -33,7 +33,7 @@ level: "Level 2", symbol: "building.2.fill", name: "Guess the capital" ) } - + NavigationLink(destination: GuessTheCountryView()) { GameButton( gradient: .tertiary, @@ -67,15 +67,25 @@ } label: { Label("Buy premium", systemImage: "star") } + + Button { + showingProfileModalView = true + } label: { + Label("Profile", systemImage: "person") + } } } .sheet(isPresented: $showingBuyPremiumModalView) { - Text("Buy premium") + BuyPremiumModalView() } .sheet(isPresented: $showingSettingsModalView) { SettingsModalView() } + + .sheet(isPresented: $showingProfileModalView) { + ProfileModalView() + } } .navigationViewStyle(StackNavigationViewStyle()) }