diff options
Diffstat (limited to 'src/components/user_search/user_search.js')
| -rw-r--r-- | src/components/user_search/user_search.js | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/src/components/user_search/user_search.js b/src/components/user_search/user_search.js deleted file mode 100644 index 55040826..00000000 --- a/src/components/user_search/user_search.js +++ /dev/null @@ -1,45 +0,0 @@ -import FollowCard from '../follow_card/follow_card.vue' -import userSearchApi from '../../services/new_api/user_search.js' -const userSearch = { - components: { - FollowCard - }, - props: [ - 'query' - ], - data () { - return { - username: '', - users: [], - loading: false - } - }, - mounted () { - this.search(this.query) - }, - watch: { - query (newV) { - this.search(newV) - } - }, - methods: { - newQuery (query) { - this.$router.push({ name: 'user-search', query: { query } }) - this.$refs.userSearchInput.focus() - }, - search (query) { - if (!query) { - this.users = [] - return - } - this.loading = true - userSearchApi.search({query, store: this.$store}) - .then((res) => { - this.loading = false - this.users = res - }) - } - } -} - -export default userSearch |
