Skip to content

Commit 82a30bc

Browse files
authored
Use same action names as in the other examples
All other examples use `showHomePage` etc., instead of `routeHomePage`.
1 parent 7dda0d8 commit 82a30bc

File tree

1 file changed

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

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ export default (ts) =>
66
code: `
77
import { Action } from 'overmind'
88
9-
export const routeHomePage: Action = ({ state }) => {
9+
export const showHomePage: Action = ({ state }) => {
1010
state.currentPage = 'home'
1111
}
1212
13-
export const routeUsersPage: Action = async ({ state, effects }) => {
13+
export const showUsersPage: Action = async ({ state, effects }) => {
1414
state.user = null
1515
state.currentPage = 'users'
1616
state.isLoadingUsers = true
1717
state.users = await effects.api.getUsers()
1818
state.isLoadingUsers = false
1919
}
2020
21-
export const routeUser: Action<{ id: string }> = async ({ state, effects }, params) => {
21+
export const showUserModal: Action<{ id: string }> = async ({ state, effects }, params) => {
2222
state.isLoadingUserDetails = true
2323
state.modalUser = await effects.api.getUserWithDetails(params.id)
2424
state.isLoadingUserDetails = false
@@ -30,19 +30,19 @@ export const routeUser: Action<{ id: string }> = async ({ state, effects }, para
3030
{
3131
fileName: 'overmind/actions.js',
3232
code: `
33-
export const routeHomePage = ({ state }) => {
33+
export const showHomePage = ({ state }) => {
3434
state.currentPage = 'home'
3535
}
3636
37-
export const routeUsersPage = async ({ state, api }) => {
37+
export const showUsersPage = async ({ state, api }) => {
3838
state.user = null
3939
state.currentPage = 'users'
4040
state.isLoadingUsers = true
4141
state.users = await api.getUsers()
4242
state.isLoadingUsers = false
4343
}
4444
45-
export const routeUser = async ({ state, api }, params) => {
45+
export const showUserModal = async ({ state, api }, params) => {
4646
state.isLoadingUserDetails = true
4747
state.modalUser = await api.getUserWithDetails(params.id)
4848
state.isLoadingUserDetails = false

0 commit comments

Comments
 (0)