-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove dashboard page and make bookings page default
- Loading branch information
Showing
11 changed files
with
29 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 0 additions & 18 deletions
18
frontend/src/components/navigation-container/bookings-tab/bookings-tab.tsx
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
frontend/src/components/navigation-container/bookings-tab/index.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import { useCallback, useEffect } from "react"; | ||
import { Link } from "react-router-dom"; | ||
import { Button, Icon, Popup } from "semantic-ui-react"; | ||
import { useMediaQuery } from "react-responsive"; | ||
|
||
import BookingUserCalendar from "../../components/booking-user-calendar"; | ||
import BookingUserTable from "../../components/booking-user-table"; | ||
|
@@ -33,6 +34,10 @@ const OPTIONS: TabOption[] = [ | |
]; | ||
|
||
function BookingsPage() { | ||
const { name } = useAppSelector(selectCurrentUserDisplayInfo) ?? {}; | ||
|
||
const isTabletOrLarger = useMediaQuery({ query: "(min-width: 768px)" }); | ||
|
||
const { getBookings: _getBookings } = useGetBookings(); | ||
const loading = useAppSelector(selectBookingsLoadingState); | ||
const { id: userId } = | ||
|
@@ -59,17 +64,13 @@ function BookingsPage() { | |
|
||
return ( | ||
<> | ||
<Button | ||
animated="vertical" | ||
fluid | ||
color="teal" | ||
as={Link} | ||
to={BOOKINGS_CREATION_PATH} | ||
> | ||
<Button.Content hidden content="Create New Bookings" /> | ||
<Button.Content visible content={<Icon name="plus" fitted />} /> | ||
</Button> | ||
|
||
<h2>Welcome, {name}!</h2> | ||
<p> | ||
<strong>Note:</strong> 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 | ||
[email protected]. | ||
</p> | ||
<h1> | ||
<HorizontalLayoutContainer align="center"> | ||
<span>My Bookings</span> | ||
|
@@ -90,6 +91,18 @@ function BookingsPage() { | |
/> | ||
</HorizontalLayoutContainer> | ||
</h1> | ||
<Button | ||
animated="vertical" | ||
fluid | ||
color="teal" | ||
as={Link} | ||
to={BOOKINGS_CREATION_PATH} | ||
> | ||
<Button.Content hidden content="Create New Bookings" /> | ||
<Button.Content visible content={<Icon name="plus" fitted />} /> | ||
</Button> | ||
|
||
{isTabletOrLarger ? <div /> : <br />} | ||
|
||
<Tab options={OPTIONS} showTitle={false} /> | ||
</> | ||
|
10 changes: 0 additions & 10 deletions
10
frontend/src/pages/dashboard-page/dashboard-page.module.scss
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters