diff --git a/frontend/src/components/pages/home/HomePage.tsx b/frontend/src/components/pages/home/HomePage.tsx index 3e54b74a..28501722 100644 --- a/frontend/src/components/pages/home/HomePage.tsx +++ b/frontend/src/components/pages/home/HomePage.tsx @@ -3,6 +3,7 @@ import { Flex, Box, Heading, Text } from "@chakra-ui/react"; import { announcementsMockData } from "../../../mocks/notifications"; import AnnouncementNotification from "./AnnouncementNotification"; import { Announcement } from "../../../types/NotificationTypes"; +import RoomGrid from "./RoomGrid"; const HomePage = (): React.ReactElement => { const [numberPosts, setNumberPosts] = useState(0); @@ -43,47 +44,58 @@ const HomePage = (): React.ReactElement => { }, []); return ( - - - Home Page - - - - - - Announcements - - - {numberPosts === 0 - ? "You're all caught up!" - : `${numberPosts} new posts today`} + + + + + Marillac Place Overview + + + + + + + Announcements + + + {numberPosts === 0 + ? "You're all caught up!" + : `${numberPosts} new posts today`} + + + + setViewAll(!viewAll)} cursor="pointer"> + {viewAll ? "View less" : "View all"} - - setViewAll(!viewAll)} cursor="pointer"> - {viewAll ? "View less" : "View all"} - - - {(viewAll ? announcements : recentAnnouncements).map( - (announcement, index) => ( - - ), - )} - + {(viewAll ? announcements : recentAnnouncements).map( + (announcement, index) => ( + + ), + )} + + ); }; -export default HomePage; +export default HomePage; \ No newline at end of file diff --git a/frontend/src/components/pages/home/RoomGrid.tsx b/frontend/src/components/pages/home/RoomGrid.tsx new file mode 100644 index 00000000..70e2485c --- /dev/null +++ b/frontend/src/components/pages/home/RoomGrid.tsx @@ -0,0 +1,39 @@ +import React, { useEffect, useState } from "react"; +import { Grid, Box, Text } from "@chakra-ui/react"; + +const rooms = [ + { id: 1, name: "Room 1", info: "Info about Room 1" }, + { id: 2, name: "Room 2", info: "Info about Room 2" }, + { id: 3, name: "Room 3", info: "Info about Room 3" }, + { id: 4, name: "Room 4", info: "Info about Room 4" }, + { id: 5, name: "Room 5", info: "Info about Room 5" }, + { id: 6, name: "Room 6", info: "Info about Room 6" }, + { id: 7, name: "Room 7", info: "Info about Room 7" }, + { id: 8, name: "Room 8", info: "Info about Room 8" }, + { id: 9, name: "Room 9", info: "Info about Room 9" }, + { id: 10, name: "Room 10", info: "Info about Room 10" }, +]; + +function RoomGrid() { + return ( + + {rooms.map((room) => ( + + {room.name} + {room.info} + + ))} + + ); +} + +export default RoomGrid; diff --git a/frontend/src/constants/Routes.ts b/frontend/src/constants/Routes.ts index 2261350f..ad382062 100644 --- a/frontend/src/constants/Routes.ts +++ b/frontend/src/constants/Routes.ts @@ -1,4 +1,4 @@ -export const HOME_PAGE = "/"; +export const HOME_PAGE = "/home"; export const ANNOUNCEMENTS_PAGE = "/announcements";