Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

191
Views
How do I return the event bus?

When I log in, I want to activate the like button.

To do that, I used the event bus and checked to see if I was logged in successfully.

But the like button is not activated.

It should return a true value when logged in, but it can't.

How can I return true?

I am using javascript and vue.

<template>
<div>
    <b-button
        :disabled="!validateForm"
        v-b-tooltip.hover.topleft.v-danger title="좋아요 누른 게시물" placement = "bottom"
        v-on:click="[on(), showlist()] "
        class="goodlist-btn"
        pill variant="outline-danger"
        style="box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;">
        <b-icon icon="heart-fill" ></b-icon>
    </b-button>
</div>
</template>
<script>
import {EventBus} from '../lib/event-bus.js'
import Vue from 'vue'

export default {
    name: 'likelist-btn',
    computed: {
        validateForm: function () {
            Vue.prototype.$firebaseAuth.eventBus.$on('onAuthStateChanged', (isLoggedIn) => {
                if (isLoggedIn) {
                    console.log('login ok: ' + isLoggedIn)
                    return true  //I should get this value returned.
                } else {
                    console.log('login no: ' + isLoggedIn)
                    return false  //I should get this value returned.
                }
            })
        }
    }
}

</script>
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!