Add shelves view to Choo routes

This commit is contained in:
Robbie Antenesse 2019-12-23 16:37:33 -07:00
parent fed8b7025b
commit 47812f45d9
2 changed files with 4 additions and 0 deletions

View File

@ -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));
}

View File

@ -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>`,
]