Skip to content

Commit

Permalink
refactor: ios 17.0 preview
Browse files Browse the repository at this point in the history
  • Loading branch information
reez authored Aug 21, 2023
1 parent f03386d commit 88e81a9
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 83 deletions.
10 changes: 2 additions & 8 deletions BDKSwiftExampleWallet/View/OnboardingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,6 @@ struct OnboardingView: View {
}
}

struct OnboardingView_Previews: PreviewProvider {
static var previews: some View {
OnboardingView(viewModel: .init())
.previewDisplayName("Light Mode")
OnboardingView(viewModel: .init())
.environment(\.colorScheme, .dark)
.previewDisplayName("Dark Mode")
}
#Preview {
OnboardingView(viewModel: .init())
}
6 changes: 2 additions & 4 deletions BDKSwiftExampleWallet/View/QRCodeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ extension QRCodeView {
}
}

struct QRCodeView_Previews: PreviewProvider {
static var previews: some View {
QRCodeView(address: "tb1qz9hhk2qlsmdanrzgl38uv86hqnqe5vyszrld7s")
}
#Preview {
QRCodeView(address: "tb1qz9hhk2qlsmdanrzgl38uv86hqnqe5vyszrld7s")
}
10 changes: 2 additions & 8 deletions BDKSwiftExampleWallet/View/ReceiveView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,6 @@ struct ReceiveView: View {

}

struct ReceiveView_Previews: PreviewProvider {
static var previews: some View {
ReceiveView(viewModel: .init())
.previewDisplayName("Light Mode")
ReceiveView(viewModel: .init())
.environment(\.colorScheme, .dark)
.previewDisplayName("Dark Mode")
}
#Preview {
ReceiveView(viewModel: .init())
}
10 changes: 2 additions & 8 deletions BDKSwiftExampleWallet/View/SendView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,6 @@ struct SendView: View {
}
}

struct SendView_Previews: PreviewProvider {
static var previews: some View {
SendView(viewModel: .init())
.previewDisplayName("Light Mode")
SendView(viewModel: .init())
.environment(\.colorScheme, .dark)
.previewDisplayName("Dark Mode")
}
#Preview {
SendView(viewModel: .init())
}
8 changes: 2 additions & 6 deletions BDKSwiftExampleWallet/View/TabHomeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ struct TabHomeView: View {

}

struct TabHomeView_Previews: PreviewProvider {
static var previews: some View {
TabHomeView()
TabHomeView()
.environment(\.colorScheme, .dark)
}
#Preview {
TabHomeView()
}
53 changes: 16 additions & 37 deletions BDKSwiftExampleWallet/View/TransactionDetailsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,41 +85,20 @@ struct TransactionDetailsView: View {
}
}


struct TransactionDetailsView_Previews: PreviewProvider {
static var previews: some View {
TransactionDetailsView(
transaction: .init(
transaction: .none,
fee: nil,
received: UInt64(20),
sent: 21,
txid: "d652a7cc0138e3277c34f1eab8e63ef445a4b3d02af5f764ed0805b16d33c45b",
confirmationTime: .init(
height: UInt32(796298),
timestamp: UInt64(Date().timeIntervalSince1970
)
)
),
amount: UInt64(2000)
)
.previewDisplayName("Light Mode")
TransactionDetailsView(
transaction: .init(
transaction: .none,
fee: nil,
received: UInt64(20),
sent: 21,
txid: "d652a7cc0138e3277c34f1eab8e63ef445a4b3d02af5f764ed0805b16d33c45b",
confirmationTime: .init(
height: UInt32(796298),
timestamp: UInt64(Date().timeIntervalSince1970
)
)
),
amount: UInt64(200)
)
.environment(\.colorScheme, .dark)
.previewDisplayName("Dark Mode")
}
#Preview {
TransactionDetailsView(
transaction: .init(
transaction: .none,
fee: nil,
received: UInt64(20),
sent: 21,
txid: "d652a7cc0138e3277c34f1eab8e63ef445a4b3d02af5f764ed0805b16d33c45b",
confirmationTime: .init(
height: UInt32(796298),
timestamp: UInt64(Date().timeIntervalSince1970
)
)
),
amount: UInt64(2000)
)
}
6 changes: 2 additions & 4 deletions BDKSwiftExampleWallet/View/WalletTransactionListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ struct WalletTransactionListView: View {
}
}

struct WalletTransactionListView_Previews: PreviewProvider {
static var previews: some View {
WalletTransactionListView(transactionDetails: [])
}
#Preview {
WalletTransactionListView(transactionDetails: [])
}
10 changes: 2 additions & 8 deletions BDKSwiftExampleWallet/View/WalletView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,6 @@ struct WalletView: View {

}

struct WalletView_Previews: PreviewProvider {
static var previews: some View {
WalletView(viewModel: .init(priceService: .init()))
.previewDisplayName("Light Mode")
WalletView(viewModel: .init(priceService: .init()))
.environment(\.colorScheme, .dark)
.previewDisplayName("Dark Mode")
}
#Preview {
WalletView(viewModel: .init(priceService: .init()))
}

0 comments on commit 88e81a9

Please sign in to comment.