Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buttons hiding when rendering two StyledFirebaseAuth components #155

Open
AlexanderChiclana opened this issue Aug 27, 2021 · 1 comment
Open

Comments

@AlexanderChiclana
Copy link

I am using two StyledFirebaseAuth components, one for signing up and the other inside a modal for signing in. When the modal renders, the buttons in the modal (sign in with google, ms, email) disappear and render in the other StyledFirebaseAuth instead. When the modal closes, the buttons that had rendered behind the modal disappear.

Independently both these components work fine when they are not rendered simultaneously.

Are there known issues related to this?

I am wondering if I would be best off finding a way to stop rendering one component entirely when the other is being used

@jhuleatt
Copy link
Contributor

@AlexanderChiclana I think this is because this library uses a hard-coded id for the element it renders firebaseui into:

const ELEMENT_ID = 'firebaseui_container';

<div className={this.className} id={ELEMENT_ID}/>

this.firebaseUiWidget.start('#' + ELEMENT_ID, this.uiConfig);

Since the container always has the same id, it will likely cause issues if you render multiple at the same time. We should probably fix this in the library by using useRef instead of a hard-coded id.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants