Skip to content

Commit

Permalink
Refactor [#242] StringLiterals 사용 수정 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
chaentopia committed Sep 20, 2023
1 parent d94f635 commit 9fb168a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion YELLO-iOS/YELLO-iOS/Global/Literals/String.swift
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ enum StringLiterals {
static let secondText = "40분 대기 초기화 + 100포인트 지급!"
static let toastMessage = "링크가 복사되었습니다."
static let close = "닫기"
static let myRecommendCode = "내 천인 코드"
static let myRecommendCode = "내 추천인 코드"
static let copyStringHeader = "추천인코드: "
static let copyStringFooter = "\n\n우리 같이 YELL:O 해요!\nAndroid: https://play.google.com/store/apps/details?id=com.el.yello&hl=ko&gl=KR\niOS: https://apps.apple.com/app/id6451451050"
}

enum Recommending {
Expand Down
6 changes: 3 additions & 3 deletions YELLO-iOS/YELLO-iOS/Presentation/Inviting/InvitingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ final class InvitingView: BaseView {

extension InvitingView {

// MARK: Objc function
@objc func closeButtonClicked() {
self.isHidden = true
self.removeFromSuperview()
Expand Down Expand Up @@ -204,11 +205,10 @@ extension InvitingView {
}
}

@objc
func copyButtonClicked() {
@objc func copyButtonClicked() {
guard let recommender = self.recommenderID.text else { return }
let filteredID = String(recommender.dropFirst())
let recommenderID = "추천인코드: " + filteredID + "\n\n우리 같이 YELL:O 해요!\nAndroid: https://play.google.com/store/apps/details?id=com.el.yello&hl=ko&gl=KR\niOS: https://apps.apple.com/app/id6451451050"
let recommenderID = StringLiterals.Inviting.copyStringHeader + filteredID + StringLiterals.Inviting.copyStringFooter
UIPasteboard.general.string = recommenderID
print(UIPasteboard.general.string ?? "")
updateEvent()
Expand Down

0 comments on commit 9fb168a

Please sign in to comment.