Refactored axios util into a service
This commit is contained in:
1 parent
92877e20ec
commit
20e4c7ef07
14 files changed
+293
-289
No files matched your search
@@ -15,7 +15,7 @@ import ArrowBackRoundedIcon from "@mui/icons-material/ArrowBackRounded";
|
||||
import Check from "../../../Components/Check/Check";
|
||||
import Button from "../../../Components/Button";
|
||||
import Field from "../../../Components/Inputs/Field";
|
||||
import axiosInstance from "../../../Utils/NetworkService";
|
||||
import { networkService } from "../../../main";
|
||||
import "../index.css";
|
||||
|
||||
/**
|
||||
@@ -397,7 +397,7 @@ const Register = ({ isAdmin }) => {
|
||||
const fetchInvite = async () => {
|
||||
if (token !== undefined) {
|
||||
try {
|
||||
const res = await axiosInstance.verifyInvitationToken(token);
|
||||
const res = await networkService.verifyInvitationToken(token);
|
||||
const { role, email } = res.data.data;
|
||||
console.log(role);
|
||||
setForm({ ...form, email, role });
|
||||
|
||||
Reference in new issue
Block a user