Skip to content

Commit

Permalink
Updated Contact
Browse files Browse the repository at this point in the history
  • Loading branch information
pawello2222 committed Nov 4, 2020
1 parent bd8c8b4 commit f126b58
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Shared/Model/Contact.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,12 @@

import Foundation

struct Contact: Hashable, Codable {
struct Contact: Identifiable, Hashable, Codable {
var id = UUID().uuidString
var name: String
var dateOfBirth: Date
}

extension Contact: Identifiable {
var id: String { name }
}

extension Contact {
static func getAll() -> [Contact] {
let key = UserDefaults.Keys.contacts.rawValue
Expand Down

0 comments on commit f126b58

Please sign in to comment.