Skip to content

Commit

Permalink
clean up code
Browse files Browse the repository at this point in the history
  • Loading branch information
s0phialiu committed Feb 18, 2024
1 parent 8088c4a commit e54166f
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 162 deletions.
4 changes: 0 additions & 4 deletions HackIllinois.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@
D14D3AE3295FBDA200EB7995 /* HIBannerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D14D3AE2295FBDA100EB7995 /* HIBannerViewController.swift */; };
D158EC312B5A2D440003D799 /* HIQRAttendeeScannerSelection.swift in Sources */ = {isa = PBXBuildFile; fileRef = D158EC302B5A2D440003D799 /* HIQRAttendeeScannerSelection.swift */; };
D158EC332B5A2DFE0003D799 /* HIScanPointsShopViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D158EC322B5A2DFE0003D799 /* HIScanPointsShopViewController.swift */; };
D187BF582B781A1100AD7356 /* HIShiftCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = D187BF572B781A1100AD7356 /* HIShiftCell.swift */; };
D187BF5A2B78317600AD7356 /* Mentor.swift in Sources */ = {isa = PBXBuildFile; fileRef = D187BF592B78317600AD7356 /* Mentor.swift */; };
D187BF5C2B78318000AD7356 /* MentorService.swift in Sources */ = {isa = PBXBuildFile; fileRef = D187BF5B2B78318000AD7356 /* MentorService.swift */; };
D19D4C932B794F9100376E1B /* HIScanMentorViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D19D4C922B794F9100376E1B /* HIScanMentorViewController.swift */; };
Expand Down Expand Up @@ -363,7 +362,6 @@
D14D3AE2295FBDA100EB7995 /* HIBannerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HIBannerViewController.swift; sourceTree = "<group>"; };
D158EC302B5A2D440003D799 /* HIQRAttendeeScannerSelection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HIQRAttendeeScannerSelection.swift; sourceTree = "<group>"; };
D158EC322B5A2DFE0003D799 /* HIScanPointsShopViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HIScanPointsShopViewController.swift; sourceTree = "<group>"; };
D187BF572B781A1100AD7356 /* HIShiftCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HIShiftCell.swift; sourceTree = "<group>"; };
D187BF592B78317600AD7356 /* Mentor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Mentor.swift; sourceTree = "<group>"; };
D187BF5B2B78318000AD7356 /* MentorService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MentorService.swift; sourceTree = "<group>"; };
D19D4C922B794F9100376E1B /* HIScanMentorViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HIScanMentorViewController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -693,7 +691,6 @@
95A7D282203D4F54005EAEAF /* HIAnnouncementCell.swift */,
95A7D29F203D60E9005EAEAF /* HIBubbleCell.swift */,
95A7D281203D4F54005EAEAF /* HIEventCell.swift */,
D187BF572B781A1100AD7356 /* HIShiftCell.swift */,
3CF8DB1223B419980035ECAE /* HIProjectCell.swift */,
);
path = HIBubbleCell;
Expand Down Expand Up @@ -1100,7 +1097,6 @@
E1E4A5DA291C9BF800780BA1 /* HIOnboardingView.swift in Sources */,
95A7D290203D4F54005EAEAF /* HIAnnouncementCell.swift in Sources */,
9515E43722093E1300BCAF92 /* HIEventScannerViewController.swift in Sources */,
D187BF582B781A1100AD7356 /* HIShiftCell.swift in Sources */,
95A7D28F203D4F54005EAEAF /* HIEventCell.swift in Sources */,
ACAA717626017EC4000F42B0 /* HICollectionViewFlowLayout.swift in Sources */,
DF5B27C5299197E80034A8B9 /* Array.swift in Sources */,
Expand Down
2 changes: 0 additions & 2 deletions HackIllinois/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate, MessagingDelegate, UNUser
func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String?) {
// Called when the app has successfully registered with FCM and received a registration token
self.fcmToken = fcmToken
print("FCM Token: \(fcmToken)")

}

func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) {
// Log the notification details
print("Received notification:")
print(notification.request.content.userInfo)

completionHandler([.alert, .sound, .badge])
Expand Down
141 changes: 0 additions & 141 deletions HackIllinois/UI/TableView/Cells/HIBubbleCell/HIShiftCell.swift

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ extension HIEventDetailViewController {
}
func setupMap() {
guard let event = event else { return }
print(event.mapImageUrl)

// Check if the image URL ends with "svg" and replace it with "png"
var imageUrlString = event.mapImageUrl
Expand Down
12 changes: 2 additions & 10 deletions HackIllinois/ViewControllers/HIPointsShopSwiftUIView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ struct HIPointShopSwiftUIView: View {
.resizable()
.frame(width: isIpad ? 590 : 355, height:isIpad ? 185 : 105)
.offset(y: -25)
//Spacer()
//.frame(height: 10)

VStack(spacing: 0) {
CustomTopTabBar(tabIndex: $tabIndex)
ScrollView(showsIndicators: false) {
Expand Down Expand Up @@ -94,7 +93,6 @@ struct HIPointShopSwiftUIView: View {
}
}
}
//}
}
func getItems() {
HIAPI.ShopService.getAllItems()
Expand Down Expand Up @@ -140,15 +138,13 @@ struct PointShopItemCell: View {
Rectangle()
.foregroundColor(.clear)
.frame(width: UIScreen.main.bounds.width > 850 ? 800 : (isIpad ? 700 : 360), height: 10)
//.frame(width: isIpad ? 600 : 360, height: 10)//TODO: Change width
.background(Color(red: 0.4, green: 0.17, blue: 0.07))
.cornerRadius(1)
//transparent pane
ZStack {
Rectangle()
.fill(.white)
.frame(width: UIScreen.main.bounds.width > 850 ? 790 : (isIpad ? 690 : 350), height: 157)
//.frame(width: isIpad ? 590 : 350, height: 157)//TODO: Change width
.opacity(0.4)
HStack {
Spacer()
Expand All @@ -161,7 +157,7 @@ struct PointShopItemCell: View {
.frame(width: 145, height: 145)
Spacer()

//bubble-thing
//bubble view
VStack {
HStack{
Spacer()
Expand All @@ -178,8 +174,6 @@ struct PointShopItemCell: View {
.frame(maxWidth: .infinity)
.padding(.trailing, 20)

/*Spacer()
.frame(width:20)*/
}

HStack(alignment: .center, spacing: 7) {
Expand Down Expand Up @@ -244,13 +238,11 @@ struct TabBarButton: View {
Rectangle()
.fill(Color(red: 0.85, green: 0.25, blue: 0.47))
.frame(width: UIScreen.main.bounds.width > 850 ? 350 : (isIpad ? 295 : 155), height: isIpad ? 90: 50)
//.frame(width: isIpad ? 250: 155, height: isIpad ? 90: 50)//190
.cornerRadius(10, corners: [.topLeft, .topRight])
}else{
Rectangle()
.fill(Color(red: 0.85, green: 0.25, blue: 0.47))
.frame(width: UIScreen.main.bounds.width > 850 ? 350 : (isIpad ? 295 : 155), height: isIpad ? 90: 50)
//.frame(width: isIpad ? 250: 155, height: isIpad ? 90: 50)//190
.cornerRadius(10, corners: [.topLeft, .topRight])
.opacity(0)
}
Expand Down
3 changes: 0 additions & 3 deletions HackIllinois/ViewControllers/HIProfileCardView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ struct HIProfileCardView: View {
getRank { rank in
self.rank = rank
}
print(rank)
}
}
}.padding(.bottom, isIpad ? 40*padFactor : 25*phoneFactor)
Expand Down Expand Up @@ -199,7 +198,6 @@ struct HIProfileCardView: View {
let (qr, _) = try result.get()
DispatchQueue.main.async {
self.qrInfo = qr.qrInfo
print("qrinfo with attendee jwt", qrInfo)
}
} catch {
print("An error has occurred \(error)")
Expand All @@ -218,7 +216,6 @@ struct HIProfileCardView: View {
do {
let (userRanking, _) = try result.get()
rank = userRanking.ranking
print("rank:", rank)
completion(rank)
} catch {
print("An error has occurred in ranking \(error)")
Expand Down
1 change: 0 additions & 1 deletion HackIllinois/ViewControllers/HIProfileViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ extension HIProfileViewController {
// print("rank \(rank)")
guard let user = HIApplicationStateController.shared.user else { return }
var role = "General"
print(user.roles)
if user.roles.contains(.PRO) {
role = "Knight"
}
Expand Down

0 comments on commit e54166f

Please sign in to comment.