There was an error while loading. Please reload this page.
1 parent 18a06fb commit 66086fbCopy full SHA for 66086fb
src/context/productcontext.js
@@ -18,7 +18,7 @@ const AppProvider = ({ children }) => {
18
const[state, dispatch] = useReducer(reducer, initialState)
19
20
const getProducts = async (url)=>{
21
- dispatch({try:"SET_LOADING"})
+ dispatch({type:"SET_LOADING"})
22
try {
23
const res = await axios.get(url)
24
const products = await res.data
0 commit comments