Open kumar-abhinit opened 1 year ago
please check at line 3 in the second pic above
Issue seems to be that nextjs is trying to render component on server side. Try to make sure that it is rendered when page is loaded on client side only. Css import should not be a problem, you can put css code in global.css as well.
Okay, I will try, if you can reference me the replica of that client-side-rendering? Please let me know the steps through which I can do that.
@kumar-abhinit Adding fake delay like promise fixed that problem for me in Nextjs 14
const delay = (ms: number) => new Promise((res) => setTimeout(res, ms));
call this in useEffect before the familytree renders
Since in nextjs we can only create a single globals.css file and put all the style there only, hence putting the code of family-chart.css in there and using it after that causes the error as![SVGLengtherror](https://user-images.githubusercontent.com/78499679/209070200-93cb188a-b753-4dd3-afbd-c98a37d92a84.png)
This is the comment you have attached with the import css file.![cssError](https://user-images.githubusercontent.com/78499679/209070595-4f42ae14-2f9d-4c4d-89c2-934b27a218d6.png)
because importing it locally as raw .css file hinders it's use in other libraries of react like nextjs, hope you got the issue