Skip to content

Commit 38f5328

Browse files
committed
Minor changes
1 parent 037ec98 commit 38f5328

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

client/src/components/context/UserRoleProvider.js

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
1-
import React, { createContext, useState } from "react";
1+
import React, { createContext, useEffect, useState } from "react";
2+
import LazyFetch from "../common/requests/LazyFetch";
23

34
const UserRoleContext = createContext(undefined);
45
const UserRoleDispatchContext = createContext(undefined);
56

67
function UserRoleProvider({ children }) {
78
const [userRoleDetails, setUserRoleDetails] = useState(null);
89

10+
useEffect(() => {
11+
// LazyFetch({
12+
// type: "get",
13+
// endpoint: "",
14+
// onSuccess: () => {},
15+
// onFailure: () => {},
16+
// });
17+
}, [userRoleDetails]);
18+
919
return (
1020
<UserRoleContext.Provider value={userRoleDetails}>
1121
<UserRoleDispatchContext.Provider value={setUserRoleDetails}>

0 commit comments

Comments
 (0)