Intro-to-SE-Spring-2020/Chirpr

[ENHANCEMENT] Set full page spinner for better UX

Closed this issue · 0 comments

Details

  • Create/Set a full page spinner component on project for better user experience.

Chirpr/client/src/App.js

Lines 31 to 46 in d859b59

return (
<div data-testid='app' className='App'>
<Navigation status={isAuthed} handleLogout={handleLogout} />
<Switch>
{/* put exact so that the component is only rendered when http://localhost/ */}
<PrivateRoute path='/create-profile' isAuthed={isAuthed} exact component={() => <AuthPage register={false} login={false} createProfile />} />
<PrivateRoute path="/Feed" isAuthed={isAuthed} exact component={Feed}/>
<PrivateRoute path='/profile' isAuthed={isAuthed} exact component={() => <Profile />} />
<Route exact path='/' component={Landing} />
<Route path='/register' exact component={() => <AuthPage register login={false} createProfile={false} />} />
<Route path='/login' exact component={() => <AuthPage register={false} login createProfile={false} />} />
{/* Add all pages above the error page! -KRW */}
<Route path='*' component={ErrorPage} />
</Switch>
</div>
)

Acceptance Criteria:

  • Spinner shows after user logs in or other actions that call API and/or set redux state.
  • All other features are unaltered.

Story Points

Story Points: 2