Skip to content

Commit 1094790

Browse files
committed
Update example
1 parent 109f872 commit 1094790

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

Example/DropboxClientExampleApp/ExampleView.swift

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,14 +161,18 @@ struct ExampleView: View {
161161
Text(entry.pathLower)
162162
}
163163

164-
VStack(alignment: .leading) {
165-
Text("Client modified").font(.caption).foregroundColor(.secondary)
166-
Text(entry.clientModified.formatted(date: .complete, time: .complete))
164+
if let date = entry.clientModified {
165+
VStack(alignment: .leading) {
166+
Text("Client modified").font(.caption).foregroundColor(.secondary)
167+
Text(date.formatted(date: .complete, time: .complete))
168+
}
167169
}
168170

169-
VStack(alignment: .leading) {
170-
Text("Server modified").font(.caption).foregroundColor(.secondary)
171-
Text(entry.serverModified.formatted(date: .complete, time: .complete))
171+
if let date = entry.serverModified {
172+
VStack(alignment: .leading) {
173+
Text("Server modified").font(.caption).foregroundColor(.secondary)
174+
Text(date.formatted(date: .complete, time: .complete))
175+
}
172176
}
173177
}
174178

0 commit comments

Comments
 (0)