Skip to content

Commit 1a1c4e3

Browse files
committed
#139 / storeの設定
1 parent 9e9a887 commit 1a1c4e3

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

app/javascript/store/index.js

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import cards from '../store/modules/cards'
66
import schedules from '../store/modules/schedules'
77
import devidedschedules from '../store/modules/devidedschedules'
88
import date from '../store/modules/date'
9+
import auth from '../store/modules/auth'
910

1011
Vue.use(Vuex)
1112

@@ -17,6 +18,7 @@ const store = new Vuex.Store({
1718
schedules,
1819
// devidedschedules,
1920
date,
21+
auth,
2022
}
2123
})
2224

app/javascript/store/modules/auth.js

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import axios from 'axios'
2+
3+
4+
const auth = {
5+
namespaced: true,
6+
state: {
7+
user: [],
8+
auth: {}
9+
},
10+
getters: {
11+
user: state => state.user,
12+
auth: state => state.auth
13+
},
14+
mutations: {
15+
user (state, value) {
16+
state.user = value
17+
},
18+
auth (state, value) {
19+
state.auth = value
20+
}
21+
},
22+
actions:{
23+
},
24+
getters: {
25+
},
26+
}
27+
28+
export default auth;

0 commit comments

Comments
 (0)