Skip to content

Commit

Permalink
✨ :: [#68] Add ExpoCreate ViewModel
Browse files Browse the repository at this point in the history
  • Loading branch information
Xixn2 committed Nov 20, 2024
1 parent 1853b90 commit d64e4a0
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// ExpoApplicationView.swift
// ExpoCreateView.swift
// Expo-iOS
//
// Created by 서지완 on 11/15/24.
Expand All @@ -8,7 +8,7 @@

import SwiftUI

struct ExpoApplicationView: View {
struct ExpoCreateView: View {
@Environment(\.dismiss) var dismiss
@State private var titleTextField: String = ""
@State private var descriptionTextField: String = ""
Expand Down Expand Up @@ -188,7 +188,6 @@ struct ExpoApplicationView: View {
.padding(.top, 28)
.padding(.bottom, 8)


ExpoTextField(
"장소를 알려주세요.",
text: $locationTextField
Expand Down Expand Up @@ -232,6 +231,7 @@ struct ExpoApplicationView: View {
ImagePicker(selectedImage: $selectedImage)
}
}
.navigationBarBackButtonHidden()
}

private var isFormValid: Bool {
Expand All @@ -245,5 +245,5 @@ struct ExpoApplicationView: View {
}

#Preview {
ExpoApplicationView()
ExpoCreateView()
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ struct PostDetailView: View {
@State private var drawMap: Bool = true
@State private var showMessageSheet = false
@State private var showQrcodeSheet = false
@State private var link: String = "https://github.com/School-of-Company/Expo-iOS"
@State private var link: String = "https://github.com/xixn2"
@State private var location = Location(
locationX: 126.800771954215,
locationY: 35.1427689679488,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@ struct TabBarView: View {

MainView()
.tabItem {
Image(selectedTab == 3 ? "onCheck" : "offCheck")
Image(selectedTab == 2 ? "onCheck" : "offCheck")
Text("박람회 명단")
}
.tag(2)

MainView()
ExpoCreateView()
.tabItem {
Image(selectedTab == 4 ? "onExpo" : "offExpo")
Image(selectedTab == 3 ? "onExpo" : "offExpo")
Text("박람회 생성")
}
.tag(3)

MainView()
.tabItem {
Image(selectedTab == 5 ? "onUser" : "offUser")
Image(selectedTab == 4 ? "onUser" : "offUser")
Text("프로필")
}
.tag(4)
Expand Down
31 changes: 31 additions & 0 deletions Projects/Domain/Sources/Request/ExpoCreate/ExpoCreateRequest.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
//
// ExpoCreateRequest.swift
// Domain
//
// Created by 서지완 on 11/20/24.
// Copyright © 2024 SchoolofCompany. All rights reserved.
//

import Foundation

public struct ExpoCreateRequest: Codable {
var title: String
var description: String
var startedDay: String
var finishedDay: String
var location: String
var coverImage: String
var x: String
var y: String

public init(title: String, description: String, startedAt: String, finishedAt: String, location: String, coverImage: String, x: String, y: String) {
self.title = title
self.description = description
self.startedDay = startedAt
self.finishedDay = finishedAt
self.location = location
self.coverImage = coverImage
self.x = x
self.y = y
}
}

0 comments on commit d64e4a0

Please sign in to comment.