 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: Outlet.
-    @IBOutlet weak var myDealsTableView: UITableView!
     
     // MARK: Standard functions. 
     override func viewDidLoad() {

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

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

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