mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 16:12:12 +00:00
6 lines
205 B
JavaScript
6 lines
205 B
JavaScript
export default ({ route, app }) => {
|
|
// Take the last value (latest route child)
|
|
const theme = route.meta.reduce((theme, meta) => meta.theme || theme, 'light')
|
|
app.store.commit('SET_THEME', theme)
|
|
}
|