File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 1111 {{this.$store.getters.getLoggedInUser.first_name}} {{this.$store.getters.getLoggedInUser.last_name}}</h1 >
1212 <div class =" text-white-matcha md:text-gray-matcha w-full flex justify-center text-center mt-4 max-w-xs mx-auto" >
1313 <div class =" mr-4" >
14- <h1 class =" font-bold" >{{this.$store.getters.getLoggedInUser.likes.received.length }}</h1 >
14+ <h1 class =" font-bold" >{{userViewsReceived }}</h1 >
1515 <h1 class =" text-xs" >Views</h1 >
1616 </div >
1717 <div class =" ml-4" >
@@ -151,6 +151,7 @@ export default {
151151 },
152152 data : () => ({
153153 userInterests: [],
154+ userViewsReceived: 0 ,
154155 show: ' ' ,
155156 image: {
156157 error: null ,
@@ -258,7 +259,7 @@ export default {
258259 }
259260 },
260261 },
261- beforeMount () {
262+ async beforeMount () {
262263 window .addEventListener (' resize' , this .openSectionOnMd );
263264 if (window .innerWidth >= 768 ) {
264265 this .show = ' profile' ;
@@ -268,6 +269,8 @@ export default {
268269 for (let i = 0 ; i < tags .length ; i += 1 ) {
269270 this .userInterests .push (tags[i].name );
270271 }
272+ const userViewsReceivedRequest = await this .$http .get (' /profile/views' );
273+ this .userViewsReceived = userViewsReceivedRequest .data .views .length ;
271274 },
272275};
273276 </script >
You can’t perform that action at this time.
0 commit comments