Usereducer state is alway undefined when used with useContext