Skip to content

Commit

Permalink
Rename idle view state
Browse files Browse the repository at this point in the history
  • Loading branch information
denniskigen committed Jul 4, 2021
1 parent 84fdd9b commit 59e3402
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const App = () => {
const [isSearching, setIsSearching] = React.useState(false);
const [units, setUnits] = React.useState('metric');
const [state, dispatch] = React.useReducer(viewStateReducer, {
status: 'idle',
status: 'started',
error: null,
forecast: [],
weather: {},
Expand Down Expand Up @@ -129,7 +129,7 @@ const App = () => {
<NavBar />
<Switch>
<Route exact path="/">
{state.status === 'idle' ? <Loading /> : null}
{state.status === 'started' ? <Loading /> : null}
{state.status === 'rejected' ? (
<div className="w-3/5 md:w-3/5 lg:w-1/2 m-auto">
<div className="mx-auto sm:max-w-xl 2xl:max-w-2xl">
Expand Down

1 comment on commit 59e3402

@vercel
Copy link

@vercel vercel bot commented on 59e3402 Jul 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.