Skip to content

Commit

Permalink
feat: added HomePageController for HomePageView
Browse files Browse the repository at this point in the history
  • Loading branch information
emilfa committed Mar 10, 2026
1 parent bdaeb1c commit 6bf7ee7
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/main/java/edu/group5/app/control/HomePageController.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
package edu.group5.app.control;

public class HomePageController {
private final MainController controller;

public HomePageController(MainController controller) {
this.controller = controller;
}

public void handleDonateToACauseBtn() {
System.out.println("Donate to a cause button pressed");
controller.showBrowsePage();
}

public void handleAboutUsBtn() {
System.out.println("About us button pressed");
controller.showAboutUsPage();
}
}
6 changes: 6 additions & 0 deletions src/main/java/edu/group5/app/control/MainController.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,10 @@ public void showHomePage() {
public void showLoginPage() {
view.showLoginPage();
}

public void showBrowsePage() {
view.showBrowsePage();
}

public void showAboutUsPage() {}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6bf7ee7

Please sign in to comment.