mirror of
https://github.com/nuxt/nuxt.git
synced 2024-12-01 18:07:22 +00:00
b116d0ded4
[release]
18 lines
313 B
JavaScript
18 lines
313 B
JavaScript
export const state = () => ({
|
|
user: null
|
|
})
|
|
|
|
export const mutations = {
|
|
SET_USER (state, user) {
|
|
state.user = user
|
|
}
|
|
}
|
|
|
|
export const actions = {
|
|
FETCH_USER ({ commit }) {
|
|
commit('SET_USER', {
|
|
name: (process.client ? 'C' : 'S') + ' Æ A-' + (10 + Math.round(Math.random() * 10))
|
|
})
|
|
}
|
|
}
|