Skip to content

Commit 9670a86

Browse files
authored
Clean up SyncUps tutorial with mock value (#3148)
1 parent 3caaba5 commit 9670a86

File tree

36 files changed

+69
-355
lines changed

36 files changed

+69
-355
lines changed

Sources/ComposableArchitecture/Documentation.docc/Tutorials/BuildingSyncUps/02-ListsOfSyncUps/ListsOfSyncUps-01-code-0002.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,15 @@ enum Theme: String, CaseIterable, Equatable, Identifiable, Codable {
5959

6060
var name: String { rawValue.capitalized }
6161
}
62+
63+
extension SyncUp {
64+
static let mock = SyncUp(
65+
id: SyncUp.ID(),
66+
attendees: [
67+
Attendee(id: Attendee.ID(), name: "Blob"),
68+
Attendee(id: Attendee.ID(), name: "Blob Jr."),
69+
Attendee(id: Attendee.ID(), name: "Blob Sr."),
70+
],
71+
title: "Point-Free Morning Sync"
72+
)
73+
}

Sources/ComposableArchitecture/Documentation.docc/Tutorials/BuildingSyncUps/02-ListsOfSyncUps/ListsOfSyncUps-01-code-0003.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,15 @@ enum Theme: String, CaseIterable, Equatable, Identifiable, Codable {
6060

6161
var name: String { rawValue.capitalized }
6262
}
63+
64+
extension SyncUp {
65+
static let mock = SyncUp(
66+
id: SyncUp.ID(),
67+
attendees: [
68+
Attendee(id: Attendee.ID(), name: "Blob"),
69+
Attendee(id: Attendee.ID(), name: "Blob Jr."),
70+
Attendee(id: Attendee.ID(), name: "Blob Sr."),
71+
],
72+
title: "Point-Free Morning Sync"
73+
)
74+
}

Sources/ComposableArchitecture/Documentation.docc/Tutorials/BuildingSyncUps/02-ListsOfSyncUps/ListsOfSyncUps-01-code-0004.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,15 @@ enum Theme: String, CaseIterable, Equatable, Identifiable, Codable {
6161

6262
var name: String { rawValue.capitalized }
6363
}
64+
65+
extension SyncUp {
66+
static let mock = SyncUp(
67+
id: SyncUp.ID(),
68+
attendees: [
69+
Attendee(id: Attendee.ID(), name: "Blob"),
70+
Attendee(id: Attendee.ID(), name: "Blob Jr."),
71+
Attendee(id: Attendee.ID(), name: "Blob Sr."),
72+
],
73+
title: "Point-Free Morning Sync"
74+
)
75+
}

Sources/ComposableArchitecture/Documentation.docc/Tutorials/BuildingSyncUps/02-ListsOfSyncUps/ListsOfSyncUps-02-code-0009.swift

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -73,17 +73,7 @@ extension LabelStyle where Self == TrailingIconLabelStyle {
7373
SyncUpsListView(
7474
store: Store(
7575
initialState: SyncUpsList.State(
76-
syncUps: [
77-
SyncUp(
78-
id: SyncUp.ID(),
79-
attendees: [
80-
Attendee(id: Attendee.ID(), name: "Blob"),
81-
Attendee(id: Attendee.ID(), name: "Blob Jr."),
82-
Attendee(id: Attendee.ID(), name: "Blob Sr."),
83-
],
84-
title: "Point-Free Morning Sync"
85-
)
86-
]
76+
syncUps: [.mock]
8777
)
8878
) {
8979
SyncUpsList()

Sources/ComposableArchitecture/Documentation.docc/Tutorials/BuildingSyncUps/02-ListsOfSyncUps/ListsOfSyncUps-03-code-0001-previous.swift

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -73,17 +73,7 @@ extension LabelStyle where Self == TrailingIconLabelStyle {
7373
SyncUpsListView(
7474
store: Store(
7575
initialState: SyncUpsList.State(
76-
syncUps: [
77-
SyncUp(
78-
id: SyncUp.ID(),
79-
attendees: [
80-
Attendee(id: Attendee.ID(), name: "Blob"),
81-
Attendee(id: Attendee.ID(), name: "Blob Jr."),
82-
Attendee(id: Attendee.ID(), name: "Blob Sr."),
83-
],
84-
title: "Point-Free Morning Sync"
85-
)
86-
]
76+
syncUps: [.mock]
8777
)
8878
) {
8979
SyncUpsList()

Sources/ComposableArchitecture/Documentation.docc/Tutorials/BuildingSyncUps/02-ListsOfSyncUps/ListsOfSyncUps-03-code-0001.swift

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -73,17 +73,7 @@ extension LabelStyle where Self == TrailingIconLabelStyle {
7373
SyncUpsListView(
7474
store: Store(
7575
initialState: SyncUpsList.State(
76-
syncUps: [
77-
SyncUp(
78-
id: SyncUp.ID(),
79-
attendees: [
80-
Attendee(id: Attendee.ID(), name: "Blob"),
81-
Attendee(id: Attendee.ID(), name: "Blob Jr."),
82-
Attendee(id: Attendee.ID(), name: "Blob Sr."),
83-
],
84-
title: "Point-Free Morning Sync"
85-
)
86-
]
76+
syncUps: [.mock]
8777
)
8878
) {
8979
SyncUpsList()

Sources/ComposableArchitecture/Documentation.docc/Tutorials/BuildingSyncUps/03-SyncUpForm/SyncUpForm-02-code-0006.swift

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,7 @@ extension Duration {
8989
SyncUpFormView(
9090
store: Store(
9191
initialState: SyncUpForm.State(
92-
syncUp: SyncUp(
93-
id: SyncUp.ID(),
94-
attendees: [
95-
Attendee(id: Attendee.ID(), name: "Blob"),
96-
Attendee(id: Attendee.ID(), name: "Blob Jr."),
97-
Attendee(id: Attendee.ID(), name: "Blob Sr."),
98-
],
99-
title: "Point-Free Morning Sync"
100-
)
92+
syncUp: .mock
10193
)
10294
) {
10395
SyncUpForm()

Sources/ComposableArchitecture/Documentation.docc/Tutorials/BuildingSyncUps/03-SyncUpForm/SyncUpForm-03-code-0004-previous.swift

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,7 @@ extension Duration {
8989
SyncUpFormView(
9090
store: Store(
9191
initialState: SyncUpForm.State(
92-
syncUp: SyncUp(
93-
id: SyncUp.ID(),
94-
attendees: [
95-
Attendee(id: Attendee.ID(), name: "Blob"),
96-
Attendee(id: Attendee.ID(), name: "Blob Jr."),
97-
Attendee(id: Attendee.ID(), name: "Blob Sr."),
98-
],
99-
title: "Point-Free Morning Sync"
100-
)
92+
syncUp: .mock
10193
)
10294
) {
10395
SyncUpForm()

Sources/ComposableArchitecture/Documentation.docc/Tutorials/BuildingSyncUps/03-SyncUpForm/SyncUpForm-03-code-0004.swift

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,7 @@ extension Duration {
9090
SyncUpFormView(
9191
store: Store(
9292
initialState: SyncUpForm.State(
93-
syncUp: SyncUp(
94-
id: SyncUp.ID(),
95-
attendees: [
96-
Attendee(id: Attendee.ID(), name: "Blob"),
97-
Attendee(id: Attendee.ID(), name: "Blob Jr."),
98-
Attendee(id: Attendee.ID(), name: "Blob Sr."),
99-
],
100-
title: "Point-Free Morning Sync"
101-
)
93+
syncUp: .mock
10294
)
10395
) {
10496
SyncUpForm()

Sources/ComposableArchitecture/Documentation.docc/Tutorials/BuildingSyncUps/03-SyncUpForm/SyncUpForm-03-code-0005.swift

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,7 @@ extension Duration {
7777
SyncUpFormView(
7878
store: Store(
7979
initialState: SyncUpForm.State(
80-
syncUp: SyncUp(
81-
id: SyncUp.ID(),
82-
attendees: [
83-
Attendee(id: Attendee.ID(), name: "Blob"),
84-
Attendee(id: Attendee.ID(), name: "Blob Jr."),
85-
Attendee(id: Attendee.ID(), name: "Blob Sr."),
86-
],
87-
title: "Point-Free Morning Sync"
88-
)
80+
syncUp: .mock
8981
)
9082
) {
9183
SyncUpForm()

0 commit comments

Comments
 (0)