revert initial context
This commit is contained in:
parent
8ffe8cee1d
commit
1221c5ff99
6 changed files with 6 additions and 6 deletions
|
|
@ -2,7 +2,7 @@ import { createContext, useContext, useState } from 'react';
|
|||
|
||||
const initialAnswerData = {};
|
||||
|
||||
const AnswerContext = createContext({});
|
||||
const AnswerContext = createContext();
|
||||
|
||||
export default function AnswerProvider({ children }) {
|
||||
const [answerData, setAnswerData] = useState(initialAnswerData);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { createContext, useContext, useState } from 'react';
|
|||
|
||||
const initialErrorData = '';
|
||||
|
||||
const ErrorContext = createContext({});
|
||||
const ErrorContext = createContext();
|
||||
|
||||
export default function ErrorProvider({ children }) {
|
||||
const [error, setError] = useState(initialErrorData);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { createContext, useContext, useState } from 'react';
|
||||
|
||||
const FormContext = createContext({})
|
||||
const FormContext = createContext()
|
||||
|
||||
export default function FormProvider({ children }) {
|
||||
const [content, setContent] = useState('');
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { createContext, useContext, useState } from 'react';
|
||||
|
||||
const ModeContext = createContext({});
|
||||
const ModeContext = createContext();
|
||||
|
||||
export default function ModeProvider({ children }) {
|
||||
const [mode, setMode] = useState('light');
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { getQuestion } from 'services/questionsServices';
|
|||
|
||||
const initialQuestionData = { loading: true };
|
||||
|
||||
const QuestionContext = createContext({});
|
||||
const QuestionContext = createContext();
|
||||
|
||||
export default function QuestionProvider({ children }) {
|
||||
const { question_id } = useParams();
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { remember } from 'services/userServices';
|
|||
|
||||
const initialUserData = { loading: true };
|
||||
|
||||
const UserContext = createContext({});
|
||||
const UserContext = createContext();
|
||||
|
||||
export default function UserProvider({ children }) {
|
||||
const [userData, setUserData] = useState(initialUserData);
|
||||
|
|
|
|||
Reference in a new issue