Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "New structure for front end files" #56

Merged
merged 1 commit into from
Nov 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { GoogleOAuthProvider } from '@react-oauth/google';
import App from './pages/App';
import App from './webPages/RoutingRenders/App';
import { createRoot } from 'react-dom/client';
import { BrowserRouter } from 'react-router-dom';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useEffect, useState } from 'react';
import '../pages/App';
import '../RoutingRenders/App.css'; // Assuming you're adding the CSS here

const CookieBanner: React.FC = () => {
// State to manage whether the banner is visible
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Drawer } from "@mui/material";
import Paper from "@mui/material/Paper";
import Container from "@mui/material/Container";
import DensitySmallSharpIcon from "@mui/icons-material/DensitySmallSharp";
import { useAuth } from "../pages/AuthContext";
import { useAuth } from "../contexts/AuthContext";
// import Modal from '@mui/material/Modal';
// import Typography from '@mui/material/Typography';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
getReactionsByFamilyId,
getReactantsByReactionIdAsync,
getProductsByReactionIdAsync,
} from "../API/API_GetMethods";
} from "../../API/API_GetMethods";
import {
Family,
Mechanism,
Expand All @@ -27,7 +27,7 @@ import {
addSpeciesToReaction,
createFamily,
createMechanism,
} from "../API/API_CreateMethods";
} from "../../API/API_CreateMethods";

import {
Modal,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import List from '@mui/material/List';
import ListItem from '@mui/material/ListItem';
import ListItemText from '@mui/material/ListItemText';
import ListItemButton from '@mui/material/ListItemButton';
import { useAuth } from '../pages/AuthContext'; // Import useAuth to get the user data
import { useAuth } from '../contexts/AuthContext'; // Import useAuth to get the user data

const NavDropDown = () => {
const navigate = useNavigate();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Navigate } from 'react-router-dom';
import { useAuth } from '../pages/AuthContext';
import { useAuth } from '../contexts/AuthContext';

interface ProtectedRouteProps {
children: React.ReactNode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {
downloadOAMusicbox,
getFamilies,
getMechanismsByFamilyId,
} from "../API/API_GetMethods";
import { deleteFamily, deleteMechanism } from "../API/API_DeleteMethods";
} from "../../API/API_GetMethods";
import { deleteFamily, deleteMechanism } from "../../API/API_DeleteMethods";

import { SimpleTreeView } from "@mui/x-tree-view/SimpleTreeView";
import { TreeItem } from "@mui/x-tree-view/TreeItem";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import Tab from "@mui/material/Tab";
import {
getReactionsByMechanismId,
getSpeciesByMechanismId,
} from "../API/API_GetMethods";
} from "../../API/API_GetMethods";

const tabsHeaderStyle: React.CSSProperties = {
backgroundColor: "#f0f0f0",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React, { useState } from "react";

import RenderFamilyTree from "../components/RenderFamilyTree";
import RenderSpeciesReactionTable from "../components/RenderSpeciesReactionTable";
import { CreateFamilyModal, CreateMechanismModal } from "../components/Modals";
import RenderFamilyTree from "../Components/RenderFamilyTree";
import RenderSpeciesReactionTable from "../Components/RenderSpeciesReactionTable";
import { CreateFamilyModal, CreateMechanismModal } from "../Components/Modals";

import { StyledDetailBox } from "./familyStyling";

import { Header, Footer } from "../components/HeaderFooter";
import { Header, Footer } from "../Components/HeaderFooter";

import "../styles/family.css";
import "./family.css";

const FamilyPage = () => {
const [selectedFamilyId, setSelectedFamilyId] = useState<string | null>(null);
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ import { useNavigate } from "react-router-dom";
import { useState, useEffect } from "react";
import { googleLogout, useGoogleLogin } from "@react-oauth/google";
import axios from "axios";
import { useAuth } from "./AuthContext"; // Import the AuthContext
import { useAuth } from "../contexts/AuthContext"; // Import the AuthContext

import "../styles/logIn.css";
import "./logIn.css";
import Button from "@mui/material/Button";
import Box from "@mui/material/Box";
import Modal from "@mui/material/Modal";
import Typography from "@mui/material/Typography";
import GoogleIcon from "@mui/icons-material/Google";
import NoAccountsIcon from "@mui/icons-material/NoAccounts";
import { Footer } from "../components/HeaderFooter";
import Holidays from "../components/Holidays"; // Import the Holidays component
import { getUserByEmail } from "../API/API_GetMethods";
import { createUser } from "../API/API_CreateMethods";
import { Footer } from "../Components/HeaderFooter";
import Holidays from "../Components/Holidays"; // Import the Holidays component
import { getUserByEmail } from "../../API/API_GetMethods";
import { createUser } from "../../API/API_CreateMethods";

interface AuthUser {
access_token: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { useNavigate } from 'react-router-dom';
import Button from "@mui/material/Button";
import ButtonGroup from '@mui/material/ButtonGroup';

import { Header, Footer } from '../components/HeaderFooter';
import { Header, Footer } from '../Components/HeaderFooter';

import "../styles/loggedIn.css";
import "./loggedIn.css";

const LoggedIn = () => {
const navigate = useNavigate();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ import {
GridEventListener,
} from "@mui/x-data-grid";

import { Header, Footer } from "../components/HeaderFooter";

import "../styles/roles.css";
//import { useAuth } from "./AuthContext"; // Import the AuthContext
import { getUsers } from "../API/API_GetMethods";
import { User } from "../API/API_Interfaces";
import { updateUser } from "../API/API_UpdateMethods";
import { deleteUser } from "../API/API_DeleteMethods";
import { Header, Footer } from "../Components/HeaderFooter";

import "./roles.css";
//import { useAuth } from "../contexts/AuthContext"; // Import the AuthContext
import { getUsers } from "../../API/API_GetMethods";
import { User } from "../../API/API_Interfaces";
import { updateUser } from "../../API/API_UpdateMethods";
import { deleteUser } from "../../API/API_DeleteMethods";

function RolesToolbar() {
return (
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import React from 'react';
import '../styles/App.css'; // Assuming CSS is applied globally
import Banner from '../components/CookieBanner';
import { createTheme, ThemeProvider } from '@mui/material/styles';
//import React from 'react';
import './App.css'; // Assuming CSS is applied globally
import Banner from '../Components/CookieBanner';
//import { createTheme/*, ThemeProvider*/ } from '@mui/material/styles';
import { Route, Routes } from 'react-router-dom';
import Settings from './settings';
import LoggedIn from './loggedIn';
import FamilyPage from './family';
import LogIn from './logIn';
import RoleManagement from './RoleManagement';
import NoAccess from './Unauthorized.tsx';
import Settings from '../Settings/settings';
import LoggedIn from '../LogIn/loggedIn';
import FamilyPage from '../Family/family';
import LogIn from '../LogIn/logIn';
import RoleManagement from '../Roles/RoleManagement';
import NoAccess from '../Roles/Unauthorized.tsx';
import { AccessibilityWidget } from 'react-accessibility';
import { AuthProvider } from './AuthContext';
import ProtectedRoute from '../components/ProtectedRoute'; // The ProtectedRoute you created earlier
import { AuthProvider } from '../contexts/AuthContext';
import ProtectedRoute from '../Components/ProtectedRoute'; // The ProtectedRoute you created earlier


// const theme = createTheme({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { useNavigate } from 'react-router-dom';
import Button from "@mui/material/Button";
import ButtonGroup from '@mui/material/ButtonGroup';
import { Header, Footer } from '../components/HeaderFooter';
import { Header, Footer } from '../Components/HeaderFooter';

import "../styles/settings.css"
import "./settings.css"

const Settings = () => {
const navigate = useNavigate();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
ReactNode,
useEffect,
} from "react";
import { User } from "../API/API_Interfaces";
import { User } from "../../API/API_Interfaces";

// Define the shape of the AuthContext
interface AuthContextProps {
Expand Down
Loading