-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDestinationListViewModel.swift
More file actions
58 lines (54 loc) · 1.8 KB
/
DestinationListViewModel.swift
File metadata and controls
58 lines (54 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//
// DestinationListViewModel.swift
// TravelGuide
//
// Created by Ankit Mane on 3/20/24.
//
import Foundation
class DestinationListViewModel: ObservableObject {
@Published var destinations: [Destination] = []
// Initializer or function to load destinations
func loadDestinations() {
destinations = [
Destination(
name: XCS.bigSur.string,
imageName: "big_sur_image_name",
description: XCS.bigSureDesc.string,
attractionsCount: 3,
attractions: [
XCS.bigSurAttraction1.string,
XCS.bigSurAttraction2.string,
XCS.bigSurAttraction3.string
]
),
Destination(
name: XCS.goldenGateBridge.string,
imageName: "golden_gate_bridge_image_name",
description: XCS.goldenGateBridgeDesc.string,
attractionsCount: 1,
attractions: [
XCS.goldenGateBridgeAttraction.string
]
),
Destination(
name: XCS.alcatraz.string,
imageName: "alcatraz_image_name",
description: XCS.alcatrazDesc.string,
attractionsCount: 2,
attractions: [
XCS.alcatrazAttraction1.string,
XCS.alcatrazAttraction2.string
]
),
Destination(
name: XCS.twinPeaks.string,
imageName: "twin_peaks_image_name",
description: XCS.twinPeaksDesc.string,
attractionsCount: 1,
attractions: [
XCS.twinPeaksAttraction.string
]
)
]
}
}