             self.dealsOfUser = ownDeals
             self.myDealsTableView.reloadData()
         })
-            
     }
     
     // MARK: Segues. 

        NotificationCenter.default.post(name: Notification.Name(rawValue: "deletedDeals"), object: nil)
    }

    // MARK: Get deals of user.
    private func loadDealsUser() {
        ref.observe(.value, with: { snapshot in
            var ownDeals: [Deal] = []

import FirebaseAuth

class MyDealsViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {
    
    // MARK: Outlet.
    @IBOutlet weak var myDealsTableView: UITableView!
    
    // MARK: Variables. 
    var dealsOfUser = [Deal]()
    var ref = FIRDatabase.database().reference(withPath: "deals")
    let currentUser = (FIRAuth.auth()?.currentUser?.uid)!
    var nameDeal = String()
    var nameCompany = String()
    
    // MARK: Standard functions. 
    override func viewDidLoad() {
