Skip to content

Commit

Permalink
Add Preview (#54)
Browse files Browse the repository at this point in the history
* [ci skip] Run swift-format

* add Preview

---------

Co-authored-by: zunda-pixel <[email protected]>
  • Loading branch information
zunda-pixel and zunda-pixel authored Apr 10, 2024
1 parent d79ed5c commit 31e9f88
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
8 changes: 8 additions & 0 deletions MyLibrary/Sources/trySwiftFeature/Acknowledgements.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,11 @@ public struct AcknowledgementsView: View {
.navigationTitle(Text("Acknowledgements", bundle: .module))
}
}

#Preview {
NavigationStack {
AcknowledgementsView(store: .init(initialState: .init()) {
Acknowledgements()
})
}
}
35 changes: 35 additions & 0 deletions MyLibrary/Sources/trySwiftFeature/Profile.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,38 @@ public struct ProfileView: View {
}
}
}

#Preview {
NavigationStack {
ProfileView(store: .init(
initialState: .init(organizer: .trySwift)
) {
Profile()
})
}
}

extension Organizer {
static fileprivate let trySwift: Self = .init(
id: 1,
name: "try! Swift",
imageName: "logo",
bio: #"""
try! Swift is an international community gathering that focuses on the Swift programming language and its ecosystem. It brings together developers, industry experts, and enthusiasts for a series of talks, learning sessions, and networking opportunities. The event aims to foster collaboration, share the latest advancements and best practices, and inspire innovation within the Swift community.The revival of "try! Swift" signifies a renewed commitment to these goals, potentially after a period of hiatus or reduced activity, possibly due to global challenges like the COVID-19 pandemic. This resurgence would likely involve the organization of new events, either virtually or in-person, reflecting the latest trends and technologies within the Swift ecosystem. The revival indicates a strong, ongoing interest in Swift programming, with the community eager to reconvene, exchange ideas, and continue learning from each other.
"""#,
links: [
.init(
name: "@tryswiftconf",
url: URL(string: "https://twitter.com/tryswiftconf")!
),
.init(
name: "try! Swift Tokyo(tryswift.jp)",
url: URL(string: "https://tryswift.jp")!
),
.init(
name: "#tryswift",
url: URL(string: "https://twitter.com/search?q=%23tryswift")!
),
]
)
}
6 changes: 6 additions & 0 deletions MyLibrary/Sources/trySwiftFeature/trySwift.swift
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,9 @@ public struct TrySwiftView: View {
.navigationTitle(Text("try! Swift", bundle: .module))
}
}

#Preview {
TrySwiftView(store: .init(initialState: .init()) {
TrySwift()
})
}

0 comments on commit 31e9f88

Please sign in to comment.