Merge branch 'develop' into feat/logger

This commit is contained in:
Alexander Holliday authored and GitHub committed 2024-08-19 19:02:30 -07:00
commit 3a01e3096e
20 files changed
+568 -267

No files matched your search

+4 -3
View File
@@ -1,15 +1,16 @@
import React, { useEffect } from "react";
import { useNavigate } from "react-router-dom";
import axiosInstance from "../Utils/axiosConfig";
import { logger } from "../Utils/Logger";
import { networkService } from "../main";
const withAdminCheck = (WrappedComponent) => {
const WithAdminCheck = (props) => {
const navigate = useNavigate();
useEffect(() => {
axiosInstance
.get("/auth/users/admin")
networkService
.doesAdminExist()
.then((response) => {
if (response.data.data === true) {
navigate("/login");