feat(home): restore planning tips and add map buttons to itinerary rows
- Create shared TipsSection component for displaying planning tips - Add TipsSection to all 22 home content variants - Fix displayedTips population with onAppear in HomeView - Add map buttons to GameRowCompact (opens stadium in Apple Maps) - Add map buttons to TravelRowView (opens driving directions) - Add map buttons to CustomItemRowView (opens location when GPS available) - Add AppleMapsLauncher.openLocation() and openDirections() methods Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -59,6 +59,12 @@ struct HomeContent_Airbnb: View {
|
||||
exploreSection
|
||||
}
|
||||
|
||||
// Planning tips
|
||||
if !displayedTips.isEmpty {
|
||||
TipsSection(tips: displayedTips)
|
||||
.padding(.horizontal, 20)
|
||||
}
|
||||
|
||||
Spacer(minLength: 40)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,7 +65,14 @@ struct HomeContent_AppleMaps: View {
|
||||
// Explore section
|
||||
exploreSection
|
||||
.padding(.horizontal, 16)
|
||||
.padding(.bottom, 32)
|
||||
|
||||
// Planning tips
|
||||
if !displayedTips.isEmpty {
|
||||
TipsSection(tips: displayedTips)
|
||||
.padding(.horizontal, 16)
|
||||
}
|
||||
|
||||
Spacer().frame(height: 32)
|
||||
}
|
||||
}
|
||||
.background(bgColor.ignoresSafeArea())
|
||||
|
||||
@@ -68,6 +68,13 @@ struct HomeContent_ArtDeco: View {
|
||||
.padding(.horizontal, 24)
|
||||
}
|
||||
|
||||
// Planning tips
|
||||
if !displayedTips.isEmpty {
|
||||
TipsSection(tips: displayedTips)
|
||||
.padding(.top, 48)
|
||||
.padding(.horizontal, 24)
|
||||
}
|
||||
|
||||
// DECO FOOTER
|
||||
decoFooter
|
||||
.padding(.top, 56)
|
||||
|
||||
@@ -55,6 +55,14 @@ struct HomeContent_Brutalist: View {
|
||||
if !savedTrips.isEmpty {
|
||||
savedSection
|
||||
.padding(.vertical, 24)
|
||||
|
||||
perforatedDivider
|
||||
}
|
||||
|
||||
// Planning tips
|
||||
if !displayedTips.isEmpty {
|
||||
TipsSection(tips: displayedTips)
|
||||
.padding(.vertical, 24)
|
||||
}
|
||||
|
||||
// FOOTER STAMP
|
||||
|
||||
@@ -69,6 +69,12 @@ struct HomeContent_CarrotWeather: View {
|
||||
suggestionsSection
|
||||
}
|
||||
|
||||
// Planning tips
|
||||
if !displayedTips.isEmpty {
|
||||
TipsSection(tips: displayedTips)
|
||||
.padding(.horizontal, 20)
|
||||
}
|
||||
|
||||
Spacer(minLength: 50)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,6 +69,13 @@ struct HomeContent_DarkIndustrial: View {
|
||||
.padding(.horizontal, 20)
|
||||
}
|
||||
|
||||
// Planning tips
|
||||
if !displayedTips.isEmpty {
|
||||
TipsSection(tips: displayedTips)
|
||||
.padding(.top, 40)
|
||||
.padding(.horizontal, 20)
|
||||
}
|
||||
|
||||
// INDUSTRIAL FOOTER
|
||||
industrialFooter
|
||||
.padding(.top, 48)
|
||||
|
||||
@@ -66,6 +66,12 @@ struct HomeContent_Fantastical: View {
|
||||
suggestionsSection
|
||||
}
|
||||
|
||||
// Planning tips
|
||||
if !displayedTips.isEmpty {
|
||||
TipsSection(tips: displayedTips)
|
||||
.padding(.horizontal, 16)
|
||||
}
|
||||
|
||||
Spacer(minLength: 40)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +72,14 @@ struct HomeContent_Flighty: View {
|
||||
// Stats dashboard
|
||||
statsDashboard
|
||||
.padding(.horizontal, 20)
|
||||
.padding(.bottom, 32)
|
||||
|
||||
// Planning tips
|
||||
if !displayedTips.isEmpty {
|
||||
TipsSection(tips: displayedTips)
|
||||
.padding(.horizontal, 20)
|
||||
}
|
||||
|
||||
Spacer().frame(height: 32)
|
||||
}
|
||||
}
|
||||
.background(bgColor.ignoresSafeArea())
|
||||
|
||||
@@ -48,6 +48,12 @@ struct HomeContent_Glassmorphism: View {
|
||||
.padding(.horizontal, 16)
|
||||
}
|
||||
|
||||
// Planning tips
|
||||
if !displayedTips.isEmpty {
|
||||
TipsSection(tips: displayedTips)
|
||||
.padding(.horizontal, 16)
|
||||
}
|
||||
|
||||
Spacer(minLength: 32)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,6 +65,13 @@ struct HomeContent_LuxuryEditorial: View {
|
||||
.padding(.bottom, 48)
|
||||
}
|
||||
|
||||
// Planning tips
|
||||
if !displayedTips.isEmpty {
|
||||
TipsSection(tips: displayedTips)
|
||||
.padding(.horizontal, 24)
|
||||
.padding(.bottom, 48)
|
||||
}
|
||||
|
||||
// COLOPHON
|
||||
colophon
|
||||
.padding(.bottom, 32)
|
||||
|
||||
@@ -54,6 +54,12 @@ struct HomeContent_MaximalistChaos: View {
|
||||
.padding(.horizontal, 16)
|
||||
}
|
||||
|
||||
// Planning tips
|
||||
if !displayedTips.isEmpty {
|
||||
TipsSection(tips: displayedTips)
|
||||
.padding(.horizontal, 16)
|
||||
}
|
||||
|
||||
Spacer(minLength: 60)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,6 +57,12 @@ struct HomeContent_NeoBrutalist: View {
|
||||
.padding(.horizontal, 16)
|
||||
}
|
||||
|
||||
// Planning tips
|
||||
if !displayedTips.isEmpty {
|
||||
TipsSection(tips: displayedTips)
|
||||
.padding(.horizontal, 16)
|
||||
}
|
||||
|
||||
Spacer(minLength: 32)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,6 +60,12 @@ struct HomeContent_NikeRunClub: View {
|
||||
challengesSection
|
||||
}
|
||||
|
||||
// Planning tips
|
||||
if !displayedTips.isEmpty {
|
||||
TipsSection(tips: displayedTips)
|
||||
.padding(.horizontal, 20)
|
||||
}
|
||||
|
||||
Spacer(minLength: 50)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,6 +59,12 @@ struct HomeContent_Organic: View {
|
||||
.padding(.horizontal, 20)
|
||||
}
|
||||
|
||||
// Planning tips
|
||||
if !displayedTips.isEmpty {
|
||||
TipsSection(tips: displayedTips)
|
||||
.padding(.horizontal, 20)
|
||||
}
|
||||
|
||||
// FOOTER LEAF
|
||||
footerLeaf
|
||||
.padding(.bottom, 32)
|
||||
|
||||
@@ -59,6 +59,12 @@ struct HomeContent_Playful: View {
|
||||
.padding(.horizontal, 20)
|
||||
}
|
||||
|
||||
// Planning tips
|
||||
if !displayedTips.isEmpty {
|
||||
TipsSection(tips: displayedTips)
|
||||
.padding(.horizontal, 20)
|
||||
}
|
||||
|
||||
// FUN FOOTER
|
||||
funFooter
|
||||
.padding(.bottom, 32)
|
||||
|
||||
@@ -56,6 +56,12 @@ struct HomeContent_RetroFuturism: View {
|
||||
.padding(.horizontal, 16)
|
||||
}
|
||||
|
||||
// Planning tips
|
||||
if !displayedTips.isEmpty {
|
||||
TipsSection(tips: displayedTips)
|
||||
.padding(.horizontal, 16)
|
||||
}
|
||||
|
||||
// RETRO FOOTER
|
||||
retroFooter
|
||||
.padding(.bottom, 32)
|
||||
|
||||
@@ -65,7 +65,13 @@ struct HomeContent_SeatGeek: View {
|
||||
// Browse by sport
|
||||
browseBySportSection
|
||||
.padding(.horizontal, 16)
|
||||
.padding(.bottom, 32)
|
||||
|
||||
// Planning tips
|
||||
if !displayedTips.isEmpty {
|
||||
TipsSection(tips: displayedTips)
|
||||
.padding(.horizontal, 16)
|
||||
.padding(.bottom, 32)
|
||||
}
|
||||
}
|
||||
}
|
||||
.background(bgColor.ignoresSafeArea())
|
||||
|
||||
@@ -67,6 +67,12 @@ struct HomeContent_SoftPastel: View {
|
||||
.padding(.horizontal, 20)
|
||||
}
|
||||
|
||||
// Planning tips
|
||||
if !displayedTips.isEmpty {
|
||||
TipsSection(tips: displayedTips)
|
||||
.padding(.horizontal, 20)
|
||||
}
|
||||
|
||||
// SOFT FOOTER
|
||||
softFooter
|
||||
.padding(.bottom, 32)
|
||||
|
||||
@@ -49,6 +49,12 @@ struct HomeContent_Spotify: View {
|
||||
// Browse sports
|
||||
browseSportsSection
|
||||
|
||||
// Planning tips
|
||||
if !displayedTips.isEmpty {
|
||||
TipsSection(tips: displayedTips)
|
||||
.padding(.horizontal, 16)
|
||||
}
|
||||
|
||||
Spacer(minLength: 50)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,6 +69,12 @@ struct HomeContent_Strava: View {
|
||||
routesSection
|
||||
}
|
||||
|
||||
// Planning tips
|
||||
if !displayedTips.isEmpty {
|
||||
TipsSection(tips: displayedTips)
|
||||
.padding(.horizontal, 16)
|
||||
}
|
||||
|
||||
Spacer(minLength: 40)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,6 +72,13 @@ struct HomeContent_SwissModernist: View {
|
||||
.padding(.horizontal, 24)
|
||||
}
|
||||
|
||||
// Planning tips
|
||||
if !displayedTips.isEmpty {
|
||||
TipsSection(tips: displayedTips)
|
||||
.padding(.top, 64)
|
||||
.padding(.horizontal, 24)
|
||||
}
|
||||
|
||||
// FOOTER
|
||||
swissFooter
|
||||
.padding(.top, 80)
|
||||
|
||||
@@ -73,6 +73,13 @@ struct HomeContent_Things3: View {
|
||||
.padding(.top, savedTrips.isEmpty ? 0 : 28)
|
||||
}
|
||||
|
||||
// Planning tips
|
||||
if !displayedTips.isEmpty {
|
||||
TipsSection(tips: displayedTips)
|
||||
.padding(.horizontal, 24)
|
||||
.padding(.top, 28)
|
||||
}
|
||||
|
||||
Spacer(minLength: 60)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user