Skip to content

Commit 25db3dc

Browse files
Merge pull request cerebral#219 from 100ideas/patch-1
wrap showUsersPage() in action() so it works w/ parallel()
2 parents 0f65fc8 + c905c05 commit 25db3dc

File tree

1 file changed

+2
-2
lines changed
  • packages/overmind-website/examples/guide/routing

1 file changed

+2
-2
lines changed

packages/overmind-website/examples/guide/routing/tab.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ export const showHomePage = ({ state }) => {
5252
state.currentPage = 'home'
5353
}
5454
55-
export const showUsersPage = async ({ value: params, state, effects }) => {
55+
export const showUsersPage = action( async ({ value: params, state, effects }) => {
5656
if (!params.id) state.modalUser = null
5757
5858
state.currentPage = 'users'
5959
state.isLoadingUsers = true
6060
state.users = await effects.api.getUsers()
6161
state.isLoadingUsers = false
62-
}
62+
})
6363
6464
export const showUserModal = parallel(
6565
showUsersPage,

0 commit comments

Comments
 (0)