Skip to content

Commit

Permalink
fix #95 : 머지 conflict 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
enebin committed Sep 14, 2023
1 parent ff3155c commit 533c491
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 18 deletions.
9 changes: 5 additions & 4 deletions Projects/Features/Sources/Home/HomeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ extension HomeView {
extension HomeView {
// 하단 버튼 (시작하기 / 공유하기)
func bottomButton(_ viewStore: ViewStore<HomeFeature.State.View, HomeFeature.Action>) -> some View {
ZStack {
@Dependency(\.shortUrlAPIManager) var shortURLAPIManager

return ZStack {
Rectangle()
.cornerRadius(16)
.foregroundColor(DSKitAsset.Color.keymeWhite.swiftUIColor)
Expand All @@ -101,13 +103,12 @@ extension HomeView {
.onTapGesture {
Task {
if viewStore.isSolvedDailyTest {
// let url = "https://keyme-frontend.vercel.app/test/17"
let url = "https://keyme-frontend.vercel.app/test/\(viewStore.testId)"
let shortURL = try await ShortUrlAPIManager.shared.request(
let shortURL = try await shortURLAPIManager.request(
.shortenURL(longURL: url),
object: BitlyResponse.self).link

sharedURL = ActivityViewController.SharedURL("www.example.com")
sharedURL = ActivityViewController.SharedURL(shortURL)
} else {
viewStore.send(.startTest(.presented(.startButtonDidTap)))
}
Expand Down
11 changes: 0 additions & 11 deletions Projects/Features/Sources/Home/StartTest/StartTestFeature.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ public struct StartTestFeature: Reducer {
self.nickname = nickname
self.testData = testData
self.authorizationToken = authorizationToken

// keymeTestsState = KeymeTestsFeature.State(
// url: "https://keyme-frontend.vercel.app/test/\(testID)",
// authorizationToken: authorizationToken)
}
}

Expand All @@ -45,10 +41,6 @@ public struct StartTestFeature: Reducer {
case toggleAnimation(IconModel)
}

enum CancelID {
case startTest
}

@Dependency(\.continuousClock) var clock
@Dependency(\.keymeTestsClient) var keymeTestsClient

Expand All @@ -62,7 +54,6 @@ public struct StartTestFeature: Reducer {

case .onDisappear:
state.isAnimating = true
return .cancel(id: CancelID.startTest)

case .startAnimation(let icons):
return .run { send in
Expand All @@ -78,7 +69,6 @@ public struct StartTestFeature: Reducer {
} while true
}
}
.cancellable(id: CancelID.startTest)

case .stopAnimation:
return .cancel(id: CancelID.startAnimation)
Expand All @@ -102,7 +92,6 @@ public struct StartTestFeature: Reducer {
}
await send(.setIcon(icon))
}
.cancellable(id: CancelID.startTest)

default:
break
Expand Down
3 changes: 0 additions & 3 deletions Projects/Features/Sources/Home/StartTest/StartTestView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ public struct StartTestView: View {
.onAppear {
store.send(.onAppear)
}
.onDisappear {
store.send(.onDisappear)
}
.onDisappear {
store.send(.stopAnimation)
}
Expand Down

0 comments on commit 533c491

Please sign in to comment.