Skip to content

Commit

Permalink
fix: move FullStory init to useEffect to prevent loading in ss
Browse files Browse the repository at this point in the history
  • Loading branch information
diegopamio committed Nov 3, 2020
1 parent c24bb79 commit c15ef25
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import GitHubForkRibbon from 'react-github-fork-ribbon';
import * as FullStory from '@fullstory/browser';
import theme from '../styles/theme';

FullStory.init({ orgId: 'Z3KBX' });

const CommonHead = () => (
<Head>
<title>JSON Similarity Score</title>
Expand All @@ -19,7 +17,7 @@ const CommonHead = () => (
content="A simple tool for developers to compare json files, with detailed analysis and overall score."
/>
<script dangerouslySetInnerHTML={{
__html: ` window.heap=window.heap||[],heap.load=function(e,t) {
__html: `window.heap=window.heap||[],heap.load=function(e,t) {
window.heap.appid=e,window.heap.config=t=t||{};
var r=t.forceSSL||"https:"===document.location.protocol,a=document.createElement("script");
a.type="text/javascript",
Expand Down Expand Up @@ -47,6 +45,7 @@ export default function MyApp(props) {
if (jssStyles) {
jssStyles.parentElement.removeChild(jssStyles);
}
FullStory.init({ orgId: 'Z3KBX' });
}, []);

return (
Expand Down

1 comment on commit c15ef25

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit c15ef25 is built and deployed to Vercel.

Preview: https://json-similarity-score-2qdzc51an.vercel.app

This commit has been automatically deployed with vercel-deployment

Please sign in to comment.