Skip to content

Commit

Permalink
[#69]Refactor: 필요없는 코드 삭제 및 이름 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
Minny27 committed Mar 12, 2024
1 parent 03ba8ed commit c6001f3
Showing 1 changed file with 3 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,29 +77,12 @@ final class TagCollectionViewCell: UICollectionViewCell {
contentView.layer.masksToBounds = true
}

func bind(_ viewModel: TagItemViewModel) {
self.titleLabel.text = viewModel.title
self.emojiView.text = viewModel.emoji
func bind(_ item: EmojiType) {
self.titleLabel.text = item.name
self.emojiView.text = item.emojiCode.unicodeToEmoji()
}
}

struct TagItemViewModel {
let emojiCode: String
let title: String

var emoji: String {
emojiCode.unicodeToEmoji()
}
init(_ idealType: EmojiType) {
self.title = idealType.name
self.emojiCode = idealType.emojiCode
}

init(emojiCode: String, title: String) {
self.emojiCode = emojiCode
self.title = title
}
}
#if canImport(SwiftUI) && DEBUG
import SwiftUI

Expand Down

0 comments on commit c6001f3

Please sign in to comment.