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.
23 lines
617 B
23 lines
617 B
//
|
|
// SupportButtonView.swift
|
|
// PadelClub
|
|
//
|
|
// Created by Razmig Sarkissian on 19/06/2024.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct SupportButtonView: View {
|
|
|
|
var body: some View {
|
|
FooterButtonView("Besoin d'aide ? Un problème ? Contactez-nous !") {
|
|
openMail()
|
|
}
|
|
}
|
|
|
|
func openMail(emailTo: String = "support@padelclub.app", subject: String = "Support Padel Club") {
|
|
if let url = URL(string: "mailto:\(emailTo)?subject=\(subject)"), UIApplication.shared.canOpenURL(url) {
|
|
UIApplication.shared.open(url, options: [:], completionHandler: nil)
|
|
}
|
|
}
|
|
}
|
|
|