You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
650 B
28 lines
650 B
//
|
|
// PlayerView.swift
|
|
// PadelClub
|
|
//
|
|
// Created by Razmig Sarkissian on 24/03/2024.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct PlayerView: View {
|
|
@EnvironmentObject var dataStore: DataStore
|
|
let player: PlayerRegistration
|
|
|
|
var body: some View {
|
|
ImportedPlayerView(player: player)
|
|
.swipeActions(edge: .trailing, allowsFullSwipe: true) {
|
|
Button(role: .destructive) {
|
|
try? dataStore.playerRegistrations.delete(instance: player)
|
|
} label: {
|
|
LabelDelete()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
#Preview {
|
|
PlayerView(player: PlayerRegistration.mock())
|
|
}
|
|
|