Show Modal in nextjs
Show the personal link in a modal
Better UI
User may copy
Google how to show modal.
Found this, following it: https://devrecipes.net/modal-component-with-next-js/
It says to create a file _document.js
that nextjs supports to render in a specific DOM node outside of root node of React.
The way to modify the root DOM structure of our app is to use the _document.js file, which is provided by the library. You can read more about it in the official documentation.
it worked!
BTW, noticed that this DID NOT work: (got )
https://localhost:3000/new-note/xian991gm
Got this browser error:
This site can’t provide a secure connectionlocalhost sent an invalid response.
Try running Windows Network Diagnostics.
ERR_SSL_PROTOCOL_ERROR
But this worked:
http://localhost:3000/new-note/xian991gm
or if I simply write
localhost:3000/new-note/xian991gm in address bar, (then browser adds
http://
automatically, if I do by hand)
Summary: TIL: with localhost
, https
wont work. Use http