Refactored axios util into a service

This commit is contained in:
Alex Holliday committed 2024-08-18 17:42:49 -07:00
1 parent 92877e20ec
commit 20e4c7ef07
14 files changed
+293 -289

No files matched your search

+2 -2
View File
@@ -1,13 +1,13 @@
import React, { useEffect } from "react";
import { useNavigate } from "react-router-dom";
import axiosInstance from "../Utils/NetworkService";
import { networkService } from "../main";
const withAdminCheck = (WrappedComponent) => {
const WithAdminCheck = (props) => {
const navigate = useNavigate();
useEffect(() => {
axiosInstance
networkService
.doesAdminExist()
.then((response) => {
if (response.data.data === true) {