Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

137
Visualizações
Fake intercom widget - how to run it by clicking other buttons

I'm using fake widget unitl user click on it and run intercom chat. Before I implemented it, I used intercom chat by other buttons on webpage, but now it doesn't work and I'm wondering how I cab fix it, how I can run this fake widget by clicking another button on the page?

fake widget: LiveChatLoaderProvider

Before in _app.js I used this component:

import {IntercomProvider} from "react-use-intercom";

const IntercomWrapper = () => {
    let INTERCOM_KEY = process.env.NEXT_PUBLIC_INTERCOM_KEY;
    return (
        <IntercomProvider appId={INTERCOM_KEY} autoBoot>
        </IntercomProvider>
    )
};

export default IntercomWrapper;

and on other button worked by this:

  let openIntercom = function (e) {
    e.preventDefault();
    window.Intercom("show");
  };

now I use in _app.js:

import { LiveChatLoaderProvider, Intercom } from "react-live-chat-loader";

const IntercomWrapper = () => {
    let INTERCOM_KEY = process.env.NEXT_PUBLIC_INTERCOM_KEY;
    return (
      <LiveChatLoaderProvider
        providerKey={INTERCOM_KEY}
        provider="intercom"
      >
        <Intercom color="#0085E9" />
      </LiveChatLoaderProvider>
    );
};

and don't know how to run it but click other buttons than this fake widget one.

If anyone could help, I would be greatfull.

Also I tried to run just IntercomProvider in other button (the same I used before implemented fake widget) but in this case I can not close intercom chat, it seems, the fake one is in the same place and block intercom button. Of course if I just run intercom chat by clicking in the fake button it works fine.

Website is built using react / nextjs

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda