giveth-gatsby
giveth-gatsby copied to clipboard
Preview version of support chat
This is still WIP (design needed) - the intention is to have something online for people to test the support widget
Good thing I deployed a preview - refuses to build on Netlify due to window being referenced by the widgetbot-embed-api.
4:39:07 PM: failed Building static HTML for pages - 1.250s
4:39:07 PM: error "window" is not available during server side rendering.
4:39:07 PM:
4:39:07 PM: 25 | };
4:39:07 PM: 26 | Object.assign(_this, options);
4:39:07 PM: > 27 | window.addEventListener('message', function (_a) {
4:39:07 PM: | ^
4:39:07 PM: 28 | var data = _a.data;
4:39:07 PM: 29 | return _this.socketEvent(data);
4:39:07 PM: 30 | });
4:39:07 PM:
4:39:07 PM: WebpackError: ReferenceError: window is not defined
4:39:07 PM:
4:39:07 PM: - client.js:27
4:39:07 PM: node_modules/@widgetbot/embed-api/dist/client.js:27:1
4:39:07 PM:
4:39:07 PM: - index.js:14
4:39:07 PM: node_modules/@widgetbot/react-embed/dist/index.js:14:1
Some possible solutions: https://stackoverflow.com/questions/64308992/gatsby-failed-build-error-window-is-not-available-during-server-side-renderi