title: Using es6 shortcuts to reduce number of lines in code snippet
body: <p>Is there a more concise, prettier way to write this snippet of code? Learning es6 syntactic sugar and was wondering if i can reduce the number of lines for this snippet</p>
  
  <pre><code>const checkLoggedInSuccess = ({
    user,
  }: {
    user?: User;
  }): AuthenticationActionTypes =&gt; {
    if (user === undefined) {
      return {
        type: CHECK_LOGGED_IN_SUCCESS,
        isFetching: false,
      };
    } else {
      return {
        type: CHECK_LOGGED_IN_SUCCESS,
        isFetching: false,
        user: {
          email: user.email,
        },
      };
    }
  };
  </code></pre>