react-new-window
react-new-window copied to clipboard
Missing script sources inside <head /> in the new window
I have a custom component (a DICOM Viewer) which I am trying to open in a new window. After integrating the module with my code, I found that my component is showing partially and partially broken. After checking the console error, I noticed that the new window doesn't have the source files, which I have in my main window and the errors are related. I have looked up for this solution but didn't get any.
Here is my code chunk
{this.state.dwvModalIsOpen ? (
<NewWindow>
<div>
<DwvComponent fileURL={xrayUrl} />
</div>
</NewWindow>
) : ('')}
The source missing in the header of the new window:
<script src="https://unpkg.com/[email protected]/konva.js"></script>
 <script src="https://unpkg.com/magic-wand-tool@latest/dist/magic-wand.min.js"></script>
 <script type="text/javascript" src="https://raw.githubusercontent.com/ivmartel/dwv/develop/src/gui/style.js"></script>
 <script type="text/javascript" src="https://raw.githubusercontent.com/ivmartel/dwv/develop/src/gui/layer.js"></script>
 <script type="text/javascript" src="https://raw.githubusercontent.com/ivmartel/dwv/develop/src/gui/generic.js"></script>
 <script type="text/javascript" src="https://raw.githubusercontent.com/ivmartel/dwv/develop/dist/dwv.min.js"></script>
 <script type="text/javascript" src="https://raw.githubusercontent.com/ivmartel/dwv/develop/decoders/dwv/decode-rle.js"></script>
 <script type="text/javascript" src="https://raw.githubusercontent.com/ivmartel/dwv/develop/decoders/dwv/rle.js"></script>
 <script type="text/javascript" src="/dwv/dist/dwv.min.js"></script>