Skip to content

Commit d6a7124

Browse files
committed
try to dynamically add id to google iframe
1 parent e0859d0 commit d6a7124

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/mint-components/src/components/sqm-google-sign-in/useGoogleSignIn.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ export function useGoogleSignIn(props: GoogleSignIn) {
2424
}
2525

2626
window.addEventListener("resize", handleResize);
27+
const googleIframe = document.querySelector("iframe[id^='gsi_']");
28+
if (googleIframe) {
29+
googleIframe.id = "google-signin-iframe"; // Set a custom ID
30+
// googleIframe.style.width = "100%";
31+
}
2732
return () => {
2833
window.removeEventListener("resize", handleResize);
2934
if (resizeTimeoutRef.current) clearTimeout(resizeTimeoutRef.current);

0 commit comments

Comments
 (0)