Skip to content

Commit

Permalink
Merge pull request #58 from WildCodeSchool/making-better-database
Browse files Browse the repository at this point in the history
testing
  • Loading branch information
mahdimcheik authored Mar 6, 2024
2 parents 65bfb0b + 70e76ec commit 536f558
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend/src/context/AdminContext.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createContext, useContext, useMemo, useRef, useState } from "react";
import PropTypes from "prop-types";
// import { Navigate } from "react-router-dom";
import { Navigate } from "react-router-dom";
import axios from "axios";
import { useUserContext } from "./UserContext";
import AdminService from "../services/AdminService";
Expand Down Expand Up @@ -116,8 +116,8 @@ export default function AdminContextProvider({ children }) {
return user.isAdmin ? (
<adminContext.Provider value={adminData}>{children}</adminContext.Provider>
) : (
<adminContext.Provider value={adminData}>{children}</adminContext.Provider>
// <Navigate to="/" />
// <adminContext.Provider value={adminData}>{children}</adminContext.Provider>
<Navigate to="/admin" />
);
}
AdminContextProvider.propTypes = {
Expand Down

0 comments on commit 536f558

Please sign in to comment.