forked from bpd01001/web-three-twitter-boilerplate
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Merge pull request #6 from jjs15102/profile
profile
- Loading branch information
Showing
6 changed files
with
75 additions
and
10 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,65 @@ | ||
<template> | ||
<div class="Pofile"> | ||
<h1 class="motherfont">Profile</h1> | ||
<b-button variant="outline-primary">Boot</b-button> | ||
<div id="biohead"> | ||
<span class="motherfont"> <h1>Profile</h1> | ||
<h2 >Your Barks <i>stay</i> here.</h2> | ||
</span> | ||
<img src="/assets/barkbutton.png" alt="" width="25px"> | ||
<div class="motherfont"> | ||
<b-list-group-item class="d-flex align-items-center" v-for="(bark, index) in allBarks" :key=index> | ||
<b-avatar :src="bark.user.photoURL" class="mr-3"></b-avatar> | ||
<div class="mr-auto"> <p display="inline" > {{ bark.user.displayName }} | {{ formatDate (bark.createdAt.toDate()) }}</p> | ||
</div> | ||
<br> | ||
<div> | ||
<p>{{ bark.content }}</p> | ||
</div> | ||
</b-list-group-item> | ||
|
||
|
||
</div> | ||
|
||
</div> | ||
|
||
</template> | ||
<script> | ||
import moment from 'moment'; | ||
export default { | ||
data: function() { | ||
return { | ||
bark: { | ||
content: '', | ||
}, | ||
allBarks: [], | ||
search: '', | ||
submitted: false | ||
} | ||
}, | ||
methods: { | ||
formatDate(myDate){ | ||
return moment(myDate).format('MMMM Do YYYY, h:mm:ss a');; | ||
}, | ||
getBarks2(){ | ||
//let poweruser = this.$store.state.user | ||
db.collection("barks").where("user", "==",this.$store.state.user ) | ||
.get().then(querySnapshot => { | ||
querySnapshot.forEach(doc => { | ||
// doc.data() is never undefined for query doc snapshots | ||
console.log(doc.id, " => ", doc.data()); | ||
this.allBarks.push(doc.data()) | ||
}); | ||
}); | ||
|
||
} | ||
}, | ||
mounted(){ | ||
this.getBarks2(); | ||
</div> | ||
}, | ||
} | ||
</div> | ||
</template> | ||
</script> |