implement basic logger, replace console.log statements with logger methods
This commit is contained in:
1 parent
78e0f41f5a
commit
5c561d87ce
16 files changed
+57
-27
No files matched your search
@@ -1,6 +1,7 @@
|
||||
import React, { useEffect } from "react";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import axiosInstance from "../Utils/axiosConfig";
|
||||
import { logger } from "../Utils/Logger";
|
||||
|
||||
const withAdminCheck = (WrappedComponent) => {
|
||||
const WithAdminCheck = (props) => {
|
||||
@@ -15,7 +16,7 @@ const withAdminCheck = (WrappedComponent) => {
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error);
|
||||
logger.error(error);
|
||||
});
|
||||
}, [navigate]);
|
||||
return <WrappedComponent {...props} isAdmin={true} />;
|
||||
|
||||
Reference in new issue
Block a user