Created
January 14, 2022 19:45
-
-
Save gsans/12051b6aff6e307ec1f4dbed2d38e1a3 to your computer and use it in GitHub Desktop.
codez051: new message user details
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
<template> | |
<div v-if="profile.id !== user.id" @click="user.followedBy && selected(user)" class="w-full px-4 py-2 border-b hover:bg-lightest flex flex-row cursor-pointer" :class="!user.followedBy?'cursor-not-allowed opacity-60':''"> | |
<div class="flex-none"> | |
<img :src="`${user.imageUrl || 'default_profile.png'}`" class="h-12 w-12 rounded-full"/> | |
</div> | |
<div class="ml-2 flex flex-col w-full"> | |
<div class="flex flex-row justify-between w-full"> | |
<div class="flex flex-col"> | |
<p class="font-bold">{{ user.name }}</p> | |
<p class="text-dark text-sm">@{{ user.screenName }} {{!user.followedBy?"cant'be messaged":''}}</p> | |
</div> | |
</div> | |
</div> | |
</div> | |
</template> | |
<script> | |
import { mapGetters } from 'vuex'; | |
export default { | |
name: 'User', | |
props: ['user'], | |
computed: { | |
...mapGetters('twitter', [ | |
'profile', | |
]), | |
}, | |
methods: { | |
selected(user) { | |
this.$emit('selected', user); | |
} | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment