Open ppascualv opened 1 year ago
I just added the library to my React app and after logging in, I'm receiving a lot of errors related to permissions and security.
The code related to Aircall
import { Fab, Paper, SvgIcon } from "@mui/material" import LoginIcon from "@mui/icons-material/Login" import { useTranslation } from "next-i18next" import { styled } from "@mui/system" import AircallPhone from "aircall-everywhere" import useIntegrations from "../../hooks/useIntegrations" import { useState } from "react" import AircallPic from "../../../public/images/third_party_logos/aircall.svg" import AircallSVG from "../customSVG/AircallSVG" import AircallIcon from "../customSVG/AircallSVG" const StyledFab = styled(Fab)(({ theme }) => ({ position: "fixed", top: "80px", right: "20px", backgroundColor: "white" })) const AircallContainer = styled(Paper)(({ theme }) => ({ position: "fixed", top: "130px", right: "50px", zIndex: 2000, "& #phone": { iframe: { border: 0 } } })) export default function AircallIntegration() { const { t } = useTranslation() const { included: aircall } = useIntegrations("aircall") const { included: hubspot } = useIntegrations("hubspot") const [login, setLogin] = useState(false) const phone = new AircallPhone({ domToLoadPhone: "#phone", onLogin: settings => { console.log(settings) setLogin(true) }, onLogout: () => { setLogin(false) }, //integrationToLoad: hubspot ? "hubspot" : null, size: "big", debug: process.env.REACT_APP_ENVIRONMENT === "development" }) //if (true) return null if (!aircall) return null return ( <> <StyledFab size="large"> <AircallIcon size="large" /> </StyledFab> <AircallContainer elevation={3}> <div id="phone" /> </AircallContainer> </> ) }
Same observation on my React application and these errors are also present on the demo version that is available online here (on "load phone" button) : https://aircall.github.io/aircall-everywhere/
I just added the library to my React app and after logging in, I'm receiving a lot of errors related to permissions and security.![Screenshot 2022-12-27 at 12 56 13](https://user-images.githubusercontent.com/2453682/209663190-b767b62e-aef4-4c7f-b6e1-2c5801cd61fa.png)
The code related to Aircall