diff --git a/src/components/use-reducer-example/use-reducer-example.component.jsx b/src/components/use-reducer-example/use-reducer-example.component.jsx index a2fd20a..9749dc3 100644 --- a/src/components/use-reducer-example/use-reducer-example.component.jsx +++ b/src/components/use-reducer-example/use-reducer-example.component.jsx @@ -36,7 +36,7 @@ const setSearchQuery = queryString => ({ const UseReducerExample = () => { const [state, dispatch] = useReducer(reducer, INITIAL_STATE); - const { user, searchQuery } = state; + const { currentUser, searchQuery } = state; useEffect(() => { const fetchFunc = async () => { @@ -57,11 +57,11 @@ const UseReducerExample = () => { value={searchQuery} onChange={event => dispatch(setSearchQuery(event.target.value))} /> - {user ? ( + {currentUser ? (
-

{user.name}

-

{user.username}

-

{user.email}

+

{currentUser.name}

+

{currentUser.username}

+

{currentUser.email}

) : (

No user found