Removed error context
This commit is contained in:
parent
1dfe7b66a6
commit
ce5964662d
1 changed files with 0 additions and 17 deletions
|
|
@ -1,17 +0,0 @@
|
|||
import { createContext, useContext, useState } from 'react';
|
||||
|
||||
const initialErrorData = '';
|
||||
|
||||
const ErrorContext = createContext();
|
||||
|
||||
export default function ErrorProvider({ children }) {
|
||||
const [error, setError] = useState(initialErrorData);
|
||||
|
||||
return (
|
||||
<ErrorContext.Provider value={{ error, setError }}>
|
||||
{children}
|
||||
</ErrorContext.Provider>
|
||||
);
|
||||
}
|
||||
|
||||
export const useError = () => useContext(ErrorContext);
|
||||
Reference in a new issue