Skip to content

Commit b71a58f

Browse files
committed
Cleanup
1 parent cf59ea2 commit b71a58f

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

RubyEvents/components/carousel/EventCarousel.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ struct EventCarousel: View {
4747
}
4848

4949
#Preview {
50-
TalkCarousel(
50+
EventCarousel(
5151
title: "Test",
52-
talks: Talk.samples(),
52+
events: Event.samples() + Event.samples(),
5353
navigator: nil,
5454
viewAllURL: nil
5555
)

RubyEvents/components/carousel/FeaturedCarousel.swift

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,6 @@
88
import SwiftUI
99
import HotwireNative
1010

11-
struct NoAnimationButtonStyle: ButtonStyle {
12-
func makeBody(configuration: Configuration) -> some View {
13-
configuration.label
14-
.scaleEffect(configuration.isPressed ? 1 : 1) // No scaling
15-
.animation(nil, value: configuration.isPressed) // Disable animation
16-
}
17-
}
18-
19-
2011
struct FeaturedCarousel: View {
2112
var events: [Event]
2213
var navigator: Navigator?
@@ -31,13 +22,13 @@ struct FeaturedCarousel: View {
3122
event: event,
3223
navigator: navigator
3324
)
34-
}.buttonStyle(NoAnimationButtonStyle())
25+
}
3526
}
3627
}
3728
.tabViewStyle(
3829
PageTabViewStyle(indexDisplayMode: .always)
3930
)
40-
.animation(.easeInOut, value: events)
31+
.animation(.interactiveSpring, value: events)
4132
.edgesIgnoringSafeArea(.all)
4233
}
4334
}

0 commit comments

Comments
 (0)