Add shelves view to Choo routes
This commit is contained in:
parent
fed8b7025b
commit
47812f45d9
|
@ -3,6 +3,7 @@ import { homeView } from './views/home';
|
|||
import { aboutView } from './views/about';
|
||||
import { loginView } from './views/login';
|
||||
import { searchView } from './views/search';
|
||||
import { shelvesView } from './views/shelves';
|
||||
import { errorView } from './views/404';
|
||||
|
||||
export const appRoutes = (app) => {
|
||||
|
@ -16,5 +17,7 @@ export const appRoutes = (app) => {
|
|||
|
||||
app.route('/search', (state, emit) => globalView(state, emit, searchView));
|
||||
|
||||
app.route('/shelves', (state, emit) => globalView(state, emit, shelvesView));
|
||||
|
||||
app.route('/404', (state, emit) => globalView(state, emit, errorView));
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ export const globalView = (state, emit, view) => {
|
|||
${
|
||||
state.isLoggedIn === true
|
||||
? [
|
||||
html`<a href="/shelves" class="pseudo button">${i18n.__('global.menu_shelves')}</a>`,
|
||||
html`<a href="/account" class="pseudo button">${i18n.__('global.menu_account')}</a>`,
|
||||
html`<a href="/logout" class="pseudo button">${i18n.__('global.menu_logout')}</a>`,
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue