-
Notifications
You must be signed in to change notification settings - Fork 0
/
EditEventPreview.swift
72 lines (48 loc) · 1.75 KB
/
EditEventPreview.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
//
// EditEventPreview.swift
// Frat Maps
//
// Created by Spencer Byrne on 8/15/22.
//
import SwiftUI
struct EditEventPreview: View {
@StateObject var event = CreateEventModel()
@State var fratID: String
@Binding var title: String
@Binding var ratio: String
@Binding var date: Date
var body: some View {
let dateString = Date.getStringFromDate(date: date)
let endDateString = Date.getStringFromDate(date: Date.now) // doesn't matter the endDate is never shown on small or big row views
CreateEventSelector(event:tempEventData(id: "preview",
title: title,
fratID: fratID,
date: dateString,
endDate: endDateString,
ratio: ratio,
rating: 0.3,
userID: "preview"),
size: .small)
}
}
struct singleHypeBar: View {
var rating: Double
//var hypeLevel: Float
var body: some View {
if rating != nil {
//let hypeLevel = Float(rating)!
ProgressView(value: rating)
.progressViewStyle(LinearProgressViewStyle(tint: Color.pink))
}
else{
Text("HypeBar Status Unavailable")
}
}
}
/*
struct EditEventPreview_Previews: PreviewProvider {
static var previews: some View {
EditEventPreview(event:tempEventData(id: "id", title: "title", fratID: "frat", date: "date", ratio: "ratio", rating: 1.2, userID: "happy day") ).preferredColorScheme(.dark)
}
}
*/