view/refactor: remove redundant view structs
This commit is contained in:
@@ -244,7 +244,24 @@ struct CustomizeZapView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
MainContent
|
VStack(alignment: .center, spacing: 20) {
|
||||||
|
ZapTypeButton()
|
||||||
|
.padding(.top, 50)
|
||||||
|
|
||||||
|
Spacer()
|
||||||
|
|
||||||
|
CustomZapTextField
|
||||||
|
|
||||||
|
AmountPicker
|
||||||
|
|
||||||
|
ZapReply
|
||||||
|
|
||||||
|
ZapButton
|
||||||
|
|
||||||
|
Spacer()
|
||||||
|
|
||||||
|
Spacer()
|
||||||
|
}
|
||||||
.sheet(isPresented: $show_zap_types) {
|
.sheet(isPresented: $show_zap_types) {
|
||||||
if #available(iOS 16.0, *) {
|
if #available(iOS 16.0, *) {
|
||||||
ZapPicker
|
ZapPicker
|
||||||
@@ -292,35 +309,9 @@ struct CustomizeZapView: View {
|
|||||||
.cornerRadius(15)
|
.cornerRadius(15)
|
||||||
}
|
}
|
||||||
|
|
||||||
var CustomZap: some View {
|
|
||||||
VStack(alignment: .center, spacing: 20) {
|
|
||||||
|
|
||||||
ZapTypeButton()
|
|
||||||
.padding(.top, 50)
|
|
||||||
|
|
||||||
Spacer()
|
|
||||||
|
|
||||||
CustomZapTextField
|
|
||||||
|
|
||||||
AmountPicker
|
|
||||||
|
|
||||||
ZapReply
|
|
||||||
|
|
||||||
ZapButton
|
|
||||||
|
|
||||||
Spacer()
|
|
||||||
|
|
||||||
Spacer()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var ZapPicker: some View {
|
var ZapPicker: some View {
|
||||||
ZapTypePicker(zap_type: $zap_type, settings: state.settings, profiles: state.profiles, pubkey: target.pubkey)
|
ZapTypePicker(zap_type: $zap_type, settings: state.settings, profiles: state.profiles, pubkey: target.pubkey)
|
||||||
}
|
}
|
||||||
|
|
||||||
var MainContent: some View {
|
|
||||||
CustomZap
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extension View {
|
extension View {
|
||||||
|
|||||||
Reference in New Issue
Block a user