Skip to content

Commit

Permalink
initialize each tab pages
Browse files Browse the repository at this point in the history
  • Loading branch information
ry-itto committed Jul 13, 2023
1 parent d030323 commit 2ae5966
Show file tree
Hide file tree
Showing 11 changed files with 128 additions and 0 deletions.
42 changes: 42 additions & 0 deletions app-ios/Modules/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,32 @@ var package = Package(
.package(url: "https://github.com/realm/SwiftLint", from: "0.52.2"),
],
targets: [
.target(
name: "About",
dependencies: [
"shared",
]
),
.testTarget(
name: "AboutTests",
dependencies: [
"About",
]
),

.target(
name: "FloorMap",
dependencies: [
"shared",
]
),
.testTarget(
name: "FloorMapTests",
dependencies: [
"FloorMap",
]
),

.target(
name: "Session",
dependencies: [
Expand All @@ -33,6 +59,19 @@ var package = Package(
]
),

.target(
name: "Stamps",
dependencies: [
"shared",
]
),
.testTarget(
name: "StampsTests",
dependencies: [
"Stamps"
]
),

.target(
name: "Timetable",
dependencies: [
Expand All @@ -50,7 +89,10 @@ var package = Package(
.target(
name: "Navigation",
dependencies: [
"About",
"FloorMap",
"Session",
"Stamps",
"Timetable",
]
),
Expand Down
12 changes: 12 additions & 0 deletions app-ios/Modules/Sources/About/AboutView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import SwiftUI

public struct AboutView: View {
public init() {}
public var body: some View {
Text("About View")
}
}

// #Preview {
// AboutView()
// }
1 change: 1 addition & 0 deletions app-ios/Modules/Sources/About/AboutViewModel.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

13 changes: 13 additions & 0 deletions app-ios/Modules/Sources/FloorMap/FloorMapView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import SwiftUI

public struct FloorMapView: View {
public init() {}

public var body: some View {
Text("Floor Map")
}
}

// #Preview {
// FloorMapView()
// }
1 change: 1 addition & 0 deletions app-ios/Modules/Sources/FloorMap/FloorMapViewModel.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

21 changes: 21 additions & 0 deletions app-ios/Modules/Sources/Navigation/RootView.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
import About
import FloorMap
import Session
import Stamps
import SwiftUI
import Timetable

enum Tab {
case timeline
case floorMap
case stamps
case about
}

public struct RootView: View {
Expand All @@ -22,6 +28,21 @@ public struct RootView: View {
.tabItem {
Label("Timeline", systemImage: "circle")
}
FloorMapView()
.tag(Tab.floorMap)
.tabItem {
Label("FloorMap", systemImage: "circle")
}
StampsView()
.tag(Tab.stamps)
.tabItem {
Label("Stamps", systemImage: "circle")
}
AboutView()
.tag(Tab.about)
.tabItem {
Label("About", systemImage: "circle")
}
}
}
}
Expand Down
12 changes: 12 additions & 0 deletions app-ios/Modules/Sources/Stamps/StampsView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import SwiftUI

public struct StampsView: View {
public init() {}
public var body: some View {
Text("Stamps View")
}
}

// #Preview {
// StampsView()
// }
1 change: 1 addition & 0 deletions app-ios/Modules/Sources/Stamps/StampsViewModel.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

11 changes: 11 additions & 0 deletions app-ios/Modules/Tests/AboutTests/AboutTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@testable import About
import XCTest

final class AboutTests: XCTestCase {
func testExample() throws {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct
// results.
XCTAssertEqual(Core().text, "Hello, World!")
}
}
7 changes: 7 additions & 0 deletions app-ios/Modules/Tests/FloorMapTests/FloorMapTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@testable import FloorMap
import XCTest

final class FloorMapTests: XCTestCase {
func testExample() throws {
}
}
7 changes: 7 additions & 0 deletions app-ios/Modules/Tests/StampsTests/StampsTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@testable import Stamps
import XCTest

final class StampsTests: XCTestCase {
func testExample() throws {
}
}

0 comments on commit 2ae5966

Please sign in to comment.