From 3f559d05e2bff5236ee65e4b617bcb5ce9dfdfb9 Mon Sep 17 00:00:00 2001 From: bcho892 Date: Mon, 4 Mar 2024 21:42:43 +1300 Subject: [PATCH] restructure files --- client/src/App.tsx | 2 +- client/src/components/AdminBookings/AdminBookings.tsx | 2 +- client/src/components/AdminRequests/AdminRequests.tsx | 2 +- .../{ => AdminRequests}/RequestBlock/RequestBlock.tsx | 0 client/src/components/Event/Event.tsx | 2 +- client/src/components/ProfileCard/ProfileCard.tsx | 2 +- .../ProfileCurrentBookings/ProfileCurrentBookings.tsx | 2 +- client/src/pages/Admin.tsx | 6 +++--- client/src/pages/Booking.tsx | 2 +- client/src/pages/Contact.tsx | 2 +- client/src/pages/Events.tsx | 2 +- client/src/pages/Login.tsx | 2 +- client/src/pages/Profile.tsx | 8 ++++---- client/src/pages/Register.tsx | 3 +-- 14 files changed, 18 insertions(+), 19 deletions(-) rename client/src/components/{ => AdminRequests}/RequestBlock/RequestBlock.tsx (100%) diff --git a/client/src/App.tsx b/client/src/App.tsx index 35d58cb54..497779dbe 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -11,7 +11,7 @@ import Booking from "pages/Booking" import Profile from "pages/Profile" import Admin from "pages/Admin" import Thanks from "pages/Thanks" -import AdminBookingsDetailedView from "./pages/AdminBookingsDetailedView" +import AdminBookingsDetailedView from "pages/AdminBookingsDetailedView" import { BrowserRouter as Router, Route, Routes } from "react-router-dom" import { ThemeProvider } from "@mui/material" import { LocalizationProvider } from "@mui/x-date-pickers" diff --git a/client/src/components/AdminBookings/AdminBookings.tsx b/client/src/components/AdminBookings/AdminBookings.tsx index ee6e62682..97162c056 100644 --- a/client/src/components/AdminBookings/AdminBookings.tsx +++ b/client/src/components/AdminBookings/AdminBookings.tsx @@ -11,7 +11,7 @@ import "pages/Admin.css" import { useNavigate } from "react-router-dom" import React, { useState, useEffect } from "react" import { collection, getDocs } from "firebase/firestore" -import { db } from "../firebase" +import { db } from "firebase" const AdminBookings = () => { const daysOfWeek = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"] diff --git a/client/src/components/AdminRequests/AdminRequests.tsx b/client/src/components/AdminRequests/AdminRequests.tsx index 1f9c425e0..4f06a0392 100644 --- a/client/src/components/AdminRequests/AdminRequests.tsx +++ b/client/src/components/AdminRequests/AdminRequests.tsx @@ -1,5 +1,5 @@ import { Grid, Typography, Paper } from "@mui/material" -import RequestBlock from "./RequestBlock" +import RequestBlock from "./RequestBlock/RequestBlock" import { useState, useEffect } from "react" const AdminDashboardRequest = ({ setSelectedUser }: any) => { diff --git a/client/src/components/RequestBlock/RequestBlock.tsx b/client/src/components/AdminRequests/RequestBlock/RequestBlock.tsx similarity index 100% rename from client/src/components/RequestBlock/RequestBlock.tsx rename to client/src/components/AdminRequests/RequestBlock/RequestBlock.tsx diff --git a/client/src/components/Event/Event.tsx b/client/src/components/Event/Event.tsx index 2b8ba5ed8..f705efc1d 100644 --- a/client/src/components/Event/Event.tsx +++ b/client/src/components/Event/Event.tsx @@ -8,7 +8,7 @@ import { Button } from "@mui/material" import { useNavigate } from "react-router-dom" -import { auth } from "../firebase" +import { auth } from "firebase" const Event = (props: any) => { const navigate = useNavigate() diff --git a/client/src/components/ProfileCard/ProfileCard.tsx b/client/src/components/ProfileCard/ProfileCard.tsx index ffe43f7b2..a487d63b9 100644 --- a/client/src/components/ProfileCard/ProfileCard.tsx +++ b/client/src/components/ProfileCard/ProfileCard.tsx @@ -8,7 +8,7 @@ import { } from "@mui/material" import React, { useEffect, useState } from "react" -import { useAuthenticatedUser } from "../hooks/useAuthenticatedUser" +import { useAuthenticatedUser } from "hooks/useAuthenticatedUser" const textType = "body1" diff --git a/client/src/components/ProfileCurrentBookings/ProfileCurrentBookings.tsx b/client/src/components/ProfileCurrentBookings/ProfileCurrentBookings.tsx index f99bb2e77..80f4ce929 100644 --- a/client/src/components/ProfileCurrentBookings/ProfileCurrentBookings.tsx +++ b/client/src/components/ProfileCurrentBookings/ProfileCurrentBookings.tsx @@ -11,7 +11,7 @@ import React, { useEffect, useState } from "react" import { DatePicker } from "@mui/x-date-pickers/DatePicker" import dayjs from "dayjs" -import { db } from "../firebase" +import { db } from "firebase" import { collection, addDoc } from "firebase/firestore" /** diff --git a/client/src/pages/Admin.tsx b/client/src/pages/Admin.tsx index 626326092..131e16189 100644 --- a/client/src/pages/Admin.tsx +++ b/client/src/pages/Admin.tsx @@ -1,8 +1,8 @@ import React, { useState } from "react" import { Typography, Stack } from "@mui/material" -import Requests from "components/AdminRequests" -import RequestDetails from "components/RequestDetails" -import AdminBookings from "components/AdminBookings" +import Requests from "components/AdminRequests/AdminRequests" +import RequestDetails from "components/RequestDetails/RequestDetails" +import AdminBookings from "components/AdminBookings/AdminBookings" import "./Admin.css" const Admin = () => { diff --git a/client/src/pages/Booking.tsx b/client/src/pages/Booking.tsx index d3db57fe3..8c76a774a 100644 --- a/client/src/pages/Booking.tsx +++ b/client/src/pages/Booking.tsx @@ -1,5 +1,5 @@ import React from "react" -import BookingForm from "components/BookingForm" +import BookingForm from "components/BookingForm/BookingForm" import { Typography, Stack } from "@mui/material" const Booking = () => { diff --git a/client/src/pages/Contact.tsx b/client/src/pages/Contact.tsx index 9939dc7d9..e2d280a8f 100644 --- a/client/src/pages/Contact.tsx +++ b/client/src/pages/Contact.tsx @@ -1,5 +1,5 @@ import React from "react" -import ContactForm from "components/ContactForm" +import ContactForm from "components/ContactForm/ContactForm" import { Typography, Stack, Container } from "@mui/material" const Contact = () => { diff --git a/client/src/pages/Events.tsx b/client/src/pages/Events.tsx index 1e19b248d..6214e3522 100644 --- a/client/src/pages/Events.tsx +++ b/client/src/pages/Events.tsx @@ -1,5 +1,5 @@ import React from "react" -import Event from "components/Event" +import Event from "components/Event/Event" const Events = () => { // dummy state diff --git a/client/src/pages/Login.tsx b/client/src/pages/Login.tsx index e03171ea5..176b8bc84 100644 --- a/client/src/pages/Login.tsx +++ b/client/src/pages/Login.tsx @@ -1,5 +1,5 @@ import React from "react" -import LoginForm from "components/LoginForm" +import LoginForm from "components/LoginForm/LoginForm" import { Typography, Stack, Container, Link } from "@mui/material" const Login = () => { diff --git a/client/src/pages/Profile.tsx b/client/src/pages/Profile.tsx index 4b0f958d2..86fe7edc4 100644 --- a/client/src/pages/Profile.tsx +++ b/client/src/pages/Profile.tsx @@ -11,10 +11,10 @@ import { } from "firebase/firestore" import { Stack, Typography } from "@mui/material" import "../styles/Profile.css" -import ProfileCard from "components/ProfileCard" -import ProfileCalendarCard from "components/ProfileCalendarCard" -import ProfileCurrentBookings from "components/ProfileCurrentBookings" -import ProfileBookingHistory from "components/ProfileBookingHistory" +import ProfileCard from "components/ProfileCard/ProfileCard" +import ProfileCalendarCard from "components/ProfileCalendarCard/ProfileCalendarCard" +import ProfileCurrentBookings from "components/ProfileCurrentBookings/ProfileCurrentBookings" +import ProfileBookingHistory from "components/ProfileBookingHistory/ProfileBookingHistory" import { useAuthenticatedUser } from "../hooks/useAuthenticatedUser" /** diff --git a/client/src/pages/Register.tsx b/client/src/pages/Register.tsx index b7028298a..e45c24a4e 100644 --- a/client/src/pages/Register.tsx +++ b/client/src/pages/Register.tsx @@ -1,5 +1,4 @@ -import React from "react" -import SignUpForm from "components/sign-up-form/SignUpForm" +import SignUpForm from "components/SignUpForm/SignUpForm" import Typography from "@mui/material/Typography" import Container from "@mui/material/Container" import Box from "@mui/material/Box"