From 9704892760dbec9ae20e76604d43a6d73be109e3 Mon Sep 17 00:00:00 2001 From: Jonathan Loh Date: Thu, 15 Feb 2024 20:37:43 +0800 Subject: [PATCH] Remove dashboard page and make bookings page default --- .../booking-creation-finalize-view.tsx | 4 +- .../bookings-tab/bookings-tab.tsx | 18 --------- .../bookings-tab/index.ts | 1 - .../navigation-container.tsx | 3 -- .../bookings-creation-page.tsx | 4 +- .../src/pages/bookings-page/bookings-page.tsx | 35 +++++++++++------ .../dashboard-page/dashboard-page.module.scss | 10 ----- .../pages/dashboard-page/dashboard-page.tsx | 39 ------------------- frontend/src/pages/dashboard-page/index.ts | 1 - frontend/src/routes/paths.ts | 3 +- frontend/src/routes/routes.tsx | 6 --- 11 files changed, 29 insertions(+), 95 deletions(-) delete mode 100644 frontend/src/components/navigation-container/bookings-tab/bookings-tab.tsx delete mode 100644 frontend/src/components/navigation-container/bookings-tab/index.ts delete mode 100644 frontend/src/pages/dashboard-page/dashboard-page.module.scss delete mode 100644 frontend/src/pages/dashboard-page/dashboard-page.tsx delete mode 100644 frontend/src/pages/dashboard-page/index.ts diff --git a/frontend/src/components/booking-creation-finalize-view/booking-creation-finalize-view.tsx b/frontend/src/components/booking-creation-finalize-view/booking-creation-finalize-view.tsx index d8850f2..e05b8d1 100644 --- a/frontend/src/components/booking-creation-finalize-view/booking-creation-finalize-view.tsx +++ b/frontend/src/components/booking-creation-finalize-view/booking-creation-finalize-view.tsx @@ -16,7 +16,7 @@ import { selectSelectedVenue, successBookingFormSubmissionAction, } from "../../redux/slices/booking-creation-slice"; -import { BOOKINGS_PATH } from "../../routes/paths"; +import { DASHBOARD_PATH } from "../../routes/paths"; import { FieldType } from "../../types/venues"; import { resolveApiError } from "../../utils/error-utils"; import { displayDateTimeRange } from "../../utils/transform-utils"; @@ -208,7 +208,7 @@ function BookingCreationFinalizeView() { - +

Welcome, {name}!

+

+ Note: Treeckle is currently in development and we are + working hard towards making residential life better for you. For urgent + queries or if you have found any bugs, please contact us at + treeckle@googlegroups.com. +

My Bookings @@ -90,6 +91,18 @@ function BookingsPage() { />

+ + + {isTabletOrLarger ?
:
} diff --git a/frontend/src/pages/dashboard-page/dashboard-page.module.scss b/frontend/src/pages/dashboard-page/dashboard-page.module.scss deleted file mode 100644 index 23c35ad..0000000 --- a/frontend/src/pages/dashboard-page/dashboard-page.module.scss +++ /dev/null @@ -1,10 +0,0 @@ -@use "../../base"; - -.dashboardPage { - @include base.primary-color-link; - - .timetable { - width: 100%; - height: 50rem; - } -} diff --git a/frontend/src/pages/dashboard-page/dashboard-page.tsx b/frontend/src/pages/dashboard-page/dashboard-page.tsx deleted file mode 100644 index 772090c..0000000 --- a/frontend/src/pages/dashboard-page/dashboard-page.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import LinkifyTextViewer from "../../components/linkify-text-viewer"; -import useScrollToTop from "../../custom-hooks/use-scroll-to-top"; -import { useAppSelector } from "../../redux/hooks"; -import { selectCurrentUserDisplayInfo } from "../../redux/slices/current-user-slice"; -import styles from "./dashboard-page.module.scss"; - -function DashboardPage() { - const { name } = useAppSelector(selectCurrentUserDisplayInfo) ?? {}; - - useScrollToTop(); - - return ( -
- -

Welcome, {name}!

-

- Head over to the "Bookings" tab to view/make bookings. -

- - {/*

Visit the "Events" tab to see upcoming events!

*/} - -

- Note: Treeckle is currently in development and we are - working hard towards making residential life better for you. For - urgent queries or if you have found any bugs, please contact us at - treeckle@googlegroups.com. -

-
-