Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Features/ClubsFeatures/Sources/ClubsList.swift
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ public struct ClubsListFeature {
state.subscribedClubsSortType = by
return .none
case .getClubsList:
return .run { [state] send in
return .run { send in
do {
let result = try await kuringLink.getClubsList(state.selectedClubType, state.selectedDivisions.map { $0.code.lowercased() })
let result = try await kuringLink.getClubsList(.all, [])
await send(.getClubsListResponse(.success(result)))
} catch {
await send(.getClubsListResponse(.failure(.error(error.localizedDescription))))
Expand Down
4 changes: 4 additions & 0 deletions Shared/Models/Sources/Clubs.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public struct Club: Codable, Equatable {
public let category, division: String
public var isSubscribed: Bool
public var subscriberCount: Int
public let recruitmentStatus: RecruitmentStatus
public let recruitStartDate, recruitEndDate: String?

public init(
Expand All @@ -35,6 +36,7 @@ public struct Club: Codable, Equatable {
division: String,
isSubscribed: Bool,
subscriberCount: Int,
recruitmentStatus: RecruitmentStatus,
recruitStartDate: String?,
recruitEndDate: String?
) {
Expand All @@ -46,6 +48,7 @@ public struct Club: Codable, Equatable {
self.division = division
self.isSubscribed = isSubscribed
self.subscriberCount = subscriberCount
self.recruitmentStatus = recruitmentStatus
self.recruitStartDate = recruitStartDate
self.recruitEndDate = recruitEndDate
}
Expand All @@ -60,6 +63,7 @@ public struct Club: Codable, Equatable {
division: "central",
isSubscribed: true,
subscriberCount: 19,
recruitmentStatus: .recruiting,
recruitStartDate: "2026-05-01T00:00:00",
recruitEndDate: "2026-06-03T23:59:59"
)
Expand Down
2 changes: 1 addition & 1 deletion Shared/Models/Sources/Notice.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ extension Notice {
/// try Notice(userInfo: userInfo)
/// ```
public init(userInfo: [String: Any]) throws {
guard let id = userInfo["id"] as? Int else {
guard let idString = userInfo["id"] as? String, let id = Int(idString) else {
throw DecodingError.noID
}
guard let articleID = userInfo["articleId"] as? String else {
Expand Down
1 change: 0 additions & 1 deletion Shared/PushNotifications/Sources/Message/Message.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ extension Message {
self = .notice(
try Notice(userInfo: userInfo)
)

// 커스텀 알림
case "admin":
@AppStorage("com.kuring.sdk.notification.custom")
Expand Down
4 changes: 3 additions & 1 deletion UIKit/ClubsUI/Sources/ClubsDetail/ClubInfoDetailView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -353,9 +353,11 @@ private extension ClubInfoDetailView {
}

private func ddayText(for club: Club) -> (text: String, isUrgent: Bool) {
// 마감일이 있다면 D-{n} 형식 노출, 없다면 recruitmentStatus 기반
guard let end = parseDate(club.recruitEndDate ?? "") else {
return ("상시모집", false)
return (club.recruitmentStatus.rawValue, false)
}

let days = Calendar.current.dateComponents([.day], from: .now, to: end).day ?? 0

switch days {
Expand Down
9 changes: 5 additions & 4 deletions UIKit/ClubsUI/Sources/ClubsList/Views/ClubCardView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ struct ClubCardView: View {
}

private var isRecruiting: Bool {
dday.text != "마감 종료"
club.recruitmentStatus != .closed
}

// 12자 초과시 ... 처리
Expand Down Expand Up @@ -53,8 +53,8 @@ private extension ClubCardView {
AsyncImage(url: URL(string: club.iconImageUrl ?? "")) { image in
image
.resizable()
.aspectRatio(1, contentMode: .fit)
.frame(width: 84)
.aspectRatio(contentMode: .fit)
.clipShape(RoundedRectangle(cornerRadius: 12))
} placeholder: {
RoundedRectangle(cornerRadius: 14)
Expand Down Expand Up @@ -105,7 +105,7 @@ private extension ClubCardView {
Text(club.summary)
.padding(.top, 4)
.font(.system(size: 14))
.foregroundStyle(!isRecruiting ? Color.Kuring.caption2 : Color.Kuring.caption1)
.foregroundStyle(Color.Kuring.caption1)
.lineLimit(2)
.truncationMode(.tail)
}
Expand Down Expand Up @@ -160,8 +160,9 @@ private extension ClubCardView {
}

func ddayText(for club: Club) -> (text: String, isUrgent: Bool) {
// 마감일이 있다면 D-{n} 형식 노출, 없다면 recruitmentStatus 기반
guard let end = parseDate(club.recruitEndDate ?? "") else {
return ("상시모집", false)
return (club.recruitmentStatus.rawValue, false)
}

let days = Calendar.current.dateComponents([.day], from: Date(), to: end).day ?? 0
Expand Down
2 changes: 0 additions & 2 deletions UIKit/ClubsUI/Sources/ClubsList/Views/ClubsListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,7 @@ struct ClubsListView: View {
}

// MARK: - Sub-views

private extension ClubsListView {

var sortByView: some View {
HStack {
Text("총 \(store.filteredClubs?.clubs.count ?? 0)개")
Expand Down