-
Notifications
You must be signed in to change notification settings - Fork 32
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
iframe component does not render anything #12
Comments
Hi @lukBakTsh, just to confirm, you are importing the CSS right? |
@treyhuffine I'm having the same issue, what is even weirder, is that it works on local, but not on the server. When I inspect the asset that is supposed to be present, it doesn't even show the iframe, whereas it does on local.... I am importing the css files as well. |
@wwwhatley when you say on the server, do you mean the HTML that is sent from SSR? |
nope, it can be served statically with NGINX (build with CRA). It's hard to debug as package is downloaded and source is not part of the code in node_modules. |
You can see the error, when you serve the demo with build:demo of the project with NGINX. Modify /etc/hosts, create some dummy domain and create NGINX config |
The code is acting differently on localhost and "production" (server build) probably because of compiling. Problematic part of code is in "addItem" function if (isReact.component(DisplayItem) || isReact.element(DisplayItem)) { it eveluates as "false" when builded for production when rendering iframe, so nothing is rendered. Simple solution is not to render iframe as functional component const Video = () => {...} |
lightbox-react:
^0.3.7
Code:
Effect:
images inside ril-inner are rendered correctly, but div with iframe does not appear inside ril-inner.
Everything works fine on the demo page (iframe with div appear inside ril-inner) http://treyhuffine.com/lightbox-react/
I can not tell what are the differences between the version presented on the demo and v0.3.7. If anyone knows, please let me know :)
The text was updated successfully, but these errors were encountered: