-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from Cheffi-GitHub/feat/HomeView_Connect_API
�홈 뷰 API 연결
- Loading branch information
Showing
14 changed files
with
323 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
Cheffi/Module/Component/Extensions/CollectionExtension.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// | ||
// CollectionExtension.swift | ||
// Cheffi | ||
// | ||
// Created by 권승용 on 11/11/24. | ||
// | ||
|
||
extension Collection { | ||
|
||
// 안전한 index 접근을 위한 subscript 제공 | ||
subscript (safe index: Index) -> Element? { | ||
return index >= startIndex && index < endIndex ? self[index] : nil | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// | ||
// RecommendedFollower.swift | ||
// Cheffi | ||
// | ||
// Created by 권승용 on 11/11/24. | ||
// | ||
|
||
import Foundation | ||
|
||
typealias RecommendedFollowerResponse = RestResponse<[RecommendedFollower]> | ||
|
||
struct RecommendedFollower: Codable, Hashable, Identifiable { | ||
let id: Int | ||
let nickname: String | ||
let photo: PhotoInfo | ||
let instruction: String | ||
let followers: Int | ||
var isFollowed: Bool | ||
|
||
enum CodingKeys: String, CodingKey { | ||
case id, nickname, photo, instruction, followers | ||
case isFollowed = "followed" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.