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

Random white background when importing a component using an <iframe> #77

Open
NickVanzo opened this issue Jun 6, 2023 · 0 comments
Open

Comments

@NickVanzo
Copy link

Hi everyone, I'm creating a basisc next.js application where I want to display a widget I've created in NEAR.
I'm importing the widget like this using an iframe:

import Link from "next/link";

export default function page() {
    return (
        <div>
            <p>Hello Nick!</p>
            <Link href="/settings" >Click me to go to back to settings</Link>
            <iframe
            style={{
                width: "100%",
                backgroundColor: "black"
            }}
            src="https://near.social/#/embed/nickvanzo307.near/widget/Onboarding.Starter?name=Allen" />
        </div>
    )
}

This is the code of my component:

const title = "Sign in with Lens";

function navigate() {
  if (props.handle != null) {
    const handle = props.handle;
    if (!handle.includes(".lens")) {
      handle = handle + ".lens";
    }
    console.log(handle);
    const uri = `https://www.lensfrens.xyz/${handle.toLowerCase()}/follow`;
    window.open(uri, "_newtab");
  }
}

return (
  <button
    style={{
      backgroundColor: "#ABFE2C",
      color: "black",
      borderRadius: "5px",
      padding: "10px",
      border: "none",
    }}
    onClick={navigate}
  >
    {title}
  </button>
);

I can show the component on my web page but the iframe has a white background without any reason. What may be the cause?

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

1 participant