Skip to content

Commit

Permalink
[refactoring] rm debug log
Browse files Browse the repository at this point in the history
  • Loading branch information
hikarut committed May 5, 2021
1 parent 9425739 commit 8ba77b5
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 36 deletions.
7 changes: 0 additions & 7 deletions components/molecules/LoginModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ export default {
},
methods: {
loginGoogle() {
console.log('login')
const provider = new this.$firebase.auth.GoogleAuthProvider()
this.$firebase
.auth()
Expand All @@ -103,9 +102,7 @@ export default {
})
},
loginTwitter() {
console.log('loginTwitter')
const provider = new this.$firebase.auth.TwitterAuthProvider()
console.log(provider)
this.$firebase
.auth()
.signInWithRedirect(provider)
Expand All @@ -115,12 +112,10 @@ export default {
})
},
loginGitHub() {
console.log('loginGitHub')
const provider = new this.$firebase.auth.GithubAuthProvider()
provider.setCustomParameters({
allow_signup: 'true'
})
console.log(provider)
this.$firebase
.auth()
.signInWithRedirect(provider)
Expand All @@ -136,12 +131,10 @@ export default {
return new Promise((resolve, reject) => {
this.$firebase.auth().onAuthStateChanged(function(user) {
if (user) {
console.log('User is signed in.')
// オブジェクトをstoreに入れるとエラーになる
// resolve(user.uid)
resolve(user)
} else {
console.log('No user is signed in')
resolve(null)
}
})
Expand Down
2 changes: 0 additions & 2 deletions modules/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,10 @@ module.exports = function generateModule(moduleOptions) {
.firestore()
.collection('updatedAt')
.get()
console.log(updatedAt)

const updatedAtJson = updatedAt.docs.map(doc => {
return doc.data()
})
console.log(updatedAtJson)
// JSONを生成
const updatedAtJsonFile = './data/updatedAt.json'
fs.writeFile(
Expand Down
1 change: 0 additions & 1 deletion pages/contact/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ export default {
},
methods: {
next() {
console.log(this.$store.state.contact.name)
this.$router.push('/contact/confirm/')
},
...mapMutations('contact', ['setName', 'setMail', 'setContents'])
Expand Down
2 changes: 0 additions & 2 deletions pages/mypage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,10 @@ export default {
return new Promise((resolve, reject) => {
this.$firebase.auth().onAuthStateChanged(function(user) {
if (user) {
console.log('User is signed in.')
// オブジェクトをstoreに入れるとエラーになる
// resolve(user.uid)
resolve(user)
} else {
console.log('No user is signed in')
resolve(null)
}
})
Expand Down
5 changes: 0 additions & 5 deletions pages/news/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,9 @@ export default {
})
}
},
beforeMount() {
console.log(this.topData)
},
methods: {
...mapActions('newsV2', ['getTopNewsV2', 'getBeforeNews']),
async getBeforeNews() {
console.log('getBeforeNews')
console.log(this.dateBeforeNumber)
const beforeDate = getBeforeDate(
this.topData.data[0].date,
this.dateBeforeNumber
Expand Down
19 changes: 0 additions & 19 deletions store/newsV2.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,9 @@ export const mutations = {
state.dateBeforeNumber += number
},
setNewsDetail(state, { newsDetailData }) {
console.log('mutations setNewsDetail')
state.newsDetail = newsDetailData
},
// setFavoriteData(state, { favoriteData }) {
setFavoriteData(state, favoriteData) {
console.log('mutations setFavoriteData')
console.log(favoriteData)
state.favoriteData = favoriteData
},
reset(state) {
Expand Down Expand Up @@ -84,7 +80,6 @@ export const actions = {
const data = beforeNewsData.docs.map(doc => {
return doc.data()
})
console.log({ data })

// データの追加
commit('setBeforeData', data)
Expand All @@ -96,8 +91,6 @@ export const actions = {

// IDを指定してデータを取得
async getNewsById({ commit, state }, id) {
console.log('getNewsById')
console.log(id)
const data = await this.$firebase
.firestore()
.collection(id)
Expand All @@ -110,15 +103,11 @@ export const actions = {
// setNewsDetailにundefinedが入ってる
// console.log(newsData)
const newsDetailData = newsData[0]
console.log('newsDetailData')
commit('setNewsDetail', { newsDetailData })
},

// お気に入りデータの取得
async getFavoriteData({ commit, state }, uid) {
console.log('getFavoriteData')
console.log(uid)

const data = await this.$firebase
.firestore()
.collection(uid)
Expand All @@ -129,14 +118,6 @@ export const actions = {
const favoriteData = data.docs.map(doc => {
return doc.data()
})
console.log(favoriteData)
const favoriteListData = {
data: favoriteData
}
console.log(favoriteListData)
// commit('setFavoriteData', { favoriteData })
commit('setFavoriteData', favoriteData)
// commit('setFavoriteData', favoriteListData)
// commit('setFavoriteData', { favoriteListData })
}
}

0 comments on commit 8ba77b5

Please sign in to comment.