Skip to content

Commit

Permalink
Conflict 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
kimkyumbi committed Dec 30, 2024
2 parents 0fdcf17 + 1186255 commit 163c797
Show file tree
Hide file tree
Showing 26 changed files with 1,033 additions and 312 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,4 @@ Derived/
*.xcworkspace
*.xcodeproj
master.key
Package.resolved
2 changes: 1 addition & 1 deletion .mise.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[tools]
tuist = "4.9.0"
tuist = "4.32.0"

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "rank1.svg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "rank2.svg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "rank3.svg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
79 changes: 38 additions & 41 deletions Projects/App/Sources/Feature/DetailFeature/Sources/DetailView.swift
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import SwiftUI

struct DetailView: View {
@StateObject var viewModel: DetailViewModel
@State private var topNavigationState: Bool = false
@State private var emojiName: [String] = ["heart", "congrats", "thumbsUp", "thinking", "poop", "china"]
@State private var emojiServerName: [String] = ["HEART", "CONGRATUATION", "THUMBSUP", "THINKING", "POOP", "CHINA"]
@State private var emojiStates: [Int] = [0, 2, 3, 400, 500, 600]
@State private var test: [Bool] = [false, false, false, false, false, false]
@State private var graySmileState: Bool = false
@Environment(\.dismiss) private var dismiss
@StateObject var postViewModel: PostViewModel
Expand All @@ -18,11 +15,12 @@ struct DetailView: View {
@State public var name: String = ""
@State public var grade: Int = 0
@State public var imageUrl: [String] = []
@State public var tagList: [(name: String, id: Int)]
@State public var tagList: [(name: String, id: Int)] = []
@State public var emojiList: [Int] = []
@State public var checkEmojiList: [Bool] = []
@State public var createTime: String = ""
@State public var topNavigationBar: Bool = true
@State private var selectedIndex = 0

var body: some View {
NavigationStack {
Expand Down Expand Up @@ -66,12 +64,11 @@ struct DetailView: View {
.font(GPleFontFamily.Pretendard.regular.swiftUIFont(size: 14))
.foregroundStyle(GPleAsset.Color.gray800.swiftUIColor)


Spacer()
}
.padding(.top, 8)

TabView(selection: $viewModel.imageCount) {
TabView(selection: $selectedIndex) {
ForEach(imageUrl.indices, id: \.self) { index in
if let imageUrl = URL(string: imageUrl[index]) {
AsyncImage(url: imageUrl) { image in
Expand All @@ -96,7 +93,6 @@ struct DetailView: View {
.padding(.top, 16)
.padding(.leading, 16)


HStack(spacing: 8) {
ForEach(tagList.indices, id: \.self) { tag in
Text("@\(tagList[tag].name)")
Expand All @@ -107,7 +103,6 @@ struct DetailView: View {
.padding(.top, 6)
.padding(.leading, 16)


let dateString = createTime.split(separator: "T").first
if let dateString = dateString {
let components = dateString.split(separator: "-")
Expand Down Expand Up @@ -143,46 +138,48 @@ struct DetailView: View {
}
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.top, 8)
}
}

Spacer()
}
.padding(.top, 8)

if graySmileState {
HStack(spacing: 25) {
ForEach(0..<6) { tag in
Button(action: {
Haptic.impact(style: .soft)
postViewModel.setupPostId(postId: postId)
postViewModel.setupEmojiType(emojiType: emojiServerName[tag])

postViewModel.postEmoji { success in
print("\(emojiName[tag]) 성공")

if checkEmojiList[tag] == true {
emojiList[tag] -= 1
checkEmojiList[tag].toggle()
} else {
emojiList[tag] = 1
checkEmojiList[tag].toggle()
if graySmileState {
HStack(spacing: 25) {
ForEach(0..<6) { tag in
Button(action: {
Haptic.impact(style: .soft)
postViewModel.setupPostId(postId: postId)
postViewModel.setupEmojiType(emojiType: emojiServerName[tag])

postViewModel.postEmoji { success in
print("\(emojiName[tag]) 성공")

if success {
if checkEmojiList[tag] == true {
emojiList[tag] -= 1
checkEmojiList[tag].toggle()
} else {
emojiList[tag] = 1
checkEmojiList[tag].toggle()
}
}
}
}) {
Image(emojiName[tag])
}
}
}
}) {
Image(emojiName[tag])
.padding(.horizontal, 16)
.padding(.vertical, 10)
.background(
RoundedRectangle(cornerRadius: 5)
.foregroundStyle(GPleAsset.Color.gray1000.swiftUIColor)
)
.padding(.leading, 20)
.padding(.top, 10)
}
}
}
.padding(.horizontal, 16)
.padding(.vertical, 10)
.background(
RoundedRectangle(cornerRadius: 5)
.foregroundStyle(GPleAsset.Color.gray1000.swiftUIColor)
)
.padding(.leading, 20)
.padding(.top, 490)

Spacer()
}
.padding(.top, 8)
}
}
.navigationBarBackButtonHidden(true)
Expand Down

This file was deleted.

Loading

0 comments on commit 163c797

Please sign in to comment.