Conversation
| struct Books: Identifiable { | ||
| let id = UUID() | ||
| let imageName: String | ||
| let title: String | ||
| let author: String | ||
| let edition: String | ||
| let isbn: String | ||
| let uploadDate: String | ||
| } |
There was a problem hiding this comment.
No change needed to the data structure itself, but you may want to coordinate on your Book data modeling between you, Robert and Justin to sync them up eventually. For example, here's @RJB888 's latest
class Book: Codable, Identifiable { let id = UUID() let title: String let author: String let isbn: String let price: Decimal }
Text Trader/BookDetailView.swift
Outdated
|
|
||
| struct BookDetailView: View { | ||
|
|
||
| var books: Books |
There was a problem hiding this comment.
This variable would make more sense using the singular book rather than the books
There was a problem hiding this comment.
Yes, that makes sense. I will change that to "book".
| import Foundation | ||
| import SwiftUI | ||
|
|
||
| struct Books: Identifiable { |
There was a problem hiding this comment.
This struct represents a single book and its name would make more sense using the singular Book rather than the plural Books
There was a problem hiding this comment.
Also, the logo on most screens is set to Navigate to an undefined location
AND, the Help screen does not seem to be accessible from any other screen.
There was a problem hiding this comment.
Xcode did not like it when I changed "Books" to "Book".
RJB888
left a comment
There was a problem hiding this comment.
This needs changes. See comments.
| import Foundation | ||
| import SwiftUI | ||
|
|
||
| struct Books: Identifiable { |
There was a problem hiding this comment.
What is "Books" ? is it an array of books or a single book object? Why is it plural. Why do you need to identify an object as "Books" when we already have a Book object?
There was a problem hiding this comment.
This is way more data on a book than we are ready for. We are doing just an MVP here, we aren't set up for full functionality.
| } | ||
|
|
||
| struct BookList { | ||
|
|
There was a problem hiding this comment.
A hard-coded list of items should be somewhere else that can be programmatically accessed. This allows us to use it or something else interchangeably and does not bloat the actual code with dummy data.
My Account page (updated)
Post a Book page (updated)
Find a Book page (updated)
Dummy data (created)
Book Detail View (created)