diff --git a/client/public/index.html b/client/public/index.html index 86f289c08..82d1bf688 100755 --- a/client/public/index.html +++ b/client/public/index.html @@ -22,6 +22,7 @@ work correctly both with client-side routing and a non-root public URL. Learn how to configure a non-root public URL by running `npm run build`. --> + diff --git a/client/src/app.tsx b/client/src/app.tsx index 6c66466f3..b19b8de54 100644 --- a/client/src/app.tsx +++ b/client/src/app.tsx @@ -1,6 +1,6 @@ import { Component } from 'react'; import { Provider } from 'react-redux'; -import ReactDOM from 'react-dom'; +import { hydrate, render } from 'react-dom'; import { ConnectedRouter } from 'connected-react-router'; import { library } from '@fortawesome/fontawesome-svg-core'; import { LastLocationProvider } from 'react-router-last-location'; @@ -30,4 +30,9 @@ class App extends Component { } } -ReactDOM.render(, document.getElementById('root')); +const rootElement = document.getElementById('root'); +if (rootElement.hasChildNodes()) { + hydrate(, rootElement); +} else { + render(, rootElement); +} diff --git a/client/src/pages/TwitterPage/TwitterPage.tsx b/client/src/pages/TwitterPage/TwitterPage.tsx index 92f27f129..d91f175c1 100644 --- a/client/src/pages/TwitterPage/TwitterPage.tsx +++ b/client/src/pages/TwitterPage/TwitterPage.tsx @@ -10,6 +10,7 @@ import TweetShare from '../../components/TweetShare/TweetShare'; import { FCHBanner } from '../../components/FCHBanner'; import { FCHSpecialsBanner } from '../../components/SpecialsBanner'; import { WidelyAdoptedSection } from '../../components/WidelyAdoptedSection'; +import TwitterMeta from '../../components/TwitterMeta/TwitterMeta'; import apis from '../../api'; import { FIO_ADDRESS_DELIMITER, setFioName } from '../../utils'; @@ -314,6 +315,7 @@ const TwitterPage: React.FC = props => { return ( <> +