 import QRCodeReader
 
 // This view controller handles the main menu features like connection hosting, and book selection
-class MainMenuVC: UIViewController, QRCodeReaderViewControllerDelegate, LiveQueryListener
+class MainMenuVC: UIViewController, QRCodeReaderViewControllerDelegate, LiveQueryListener, UITableViewDataSource, UITableViewDelegate
 {
 	// TYPES	------------------
 	
-	typealias QueryTarget = BookView
+	typealias QueryTarget = ProjectBooksView
 	
 	
 	// OUTLETS	------------------

		disconnectButton.isEnabled = isClient
		hostingSwitch.isEnabled = !isClient
	}
}

			{
				userView.configure(userName: try avatarInfo.displayName(), userIcon: avatarInfo.image.or(#imageLiteral(resourceName: "userIcon")))
			}
			
			guard let projectId = Session.instance.projectId else
			{
				print("ERROR: No project selected when in main menu")
				return
			}
			
			guard let project = try Project.get(projectId) else
			{
				print("ERROR: Couldn't find correct project data")
				return
			}
			
			// Loads the available book data
			queryManager = ProjectBooksView.instance.booksQuery(languageId: project.languageId, projectId: projectId).liveQueryManager
			queryManager?.addListener(AnyLiveQueryListener(self))
			queryManager?.start()
		}
		catch
		{
			print("ERROR: Failed to setup data for the main menu. \(error)")
		}
    }
	
	
