From 1ae045c3feaedaaca54c58a6c303a5e4fa0cbcbf Mon Sep 17 00:00:00 2001 From: Travis Fischer Date: Thu, 28 Jan 2021 02:01:20 -0500 Subject: [PATCH] fix: attempt to fix ssr issues --- components/Footer.tsx | 16 +++++---- components/NotionPage.tsx | 5 ++- pages/_document.tsx | 69 ++++++++++++++++++++------------------- yarn.lock | 31 ++++++++---------- 4 files changed, 60 insertions(+), 61 deletions(-) diff --git a/components/Footer.tsx b/components/Footer.tsx index d0c4141..cf33651 100644 --- a/components/Footer.tsx +++ b/components/Footer.tsx @@ -22,13 +22,15 @@ export const Footer: React.FC<{
Copyright 2021 Travis Fischer
- - {isDarkMode ? : } - + {!config.isServer && ( + + {isDarkMode ? : } + + )}
diff --git a/components/NotionPage.tsx b/components/NotionPage.tsx index 7f0e934..d439166 100644 --- a/components/NotionPage.tsx +++ b/components/NotionPage.tsx @@ -4,7 +4,6 @@ import Link from 'next/link' import cs from 'classnames' import { useRouter } from 'next/router' import { useLocalStorage, useSearchParam } from 'react-use' -import { IconContext } from 'react-icons' import BodyClassName from 'react-body-classname' // core notion renderer @@ -122,7 +121,7 @@ export const NotionPage: React.FC = ({ } return ( - + <> @@ -220,6 +219,6 @@ export const NotionPage: React.FC = ({ /> - + ) } diff --git a/pages/_document.tsx b/pages/_document.tsx index aac5189..641da99 100644 --- a/pages/_document.tsx +++ b/pages/_document.tsx @@ -1,46 +1,49 @@ import React from 'react' import Document, { Html, Head, Main, NextScript } from 'next/document' +import { IconContext } from 'react-icons' export default class MyDocument extends Document { render() { return ( - - - + + + + - - - - + + + + - - + + - -
+ +
- - - + + + + ) } } diff --git a/yarn.lock b/yarn.lock index 765ba4c..acc9b65 100644 --- a/yarn.lock +++ b/yarn.lock @@ -402,16 +402,11 @@ resolved "https://registry.yarnpkg.com/@types/js-cookie/-/js-cookie-2.2.6.tgz#f1a1cb35aff47bc5cfb05cb0c441ca91e914c26f" integrity sha512-+oY0FDTO2GYKEV0YPvSshGq9t7YozVkgvXLty7zogQNuCxBhT9/3INX9Q7H1aRZ4SUDRXAKlJuA4EA5nTt7SNw== -"@types/json-schema@^7.0.3": +"@types/json-schema@^7.0.3", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.6": version "7.0.7" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.7.tgz#98a993516c859eb0d5c4c8f098317a9ea68db9ad" integrity sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA== -"@types/json-schema@^7.0.5", "@types/json-schema@^7.0.6": - version "7.0.6" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.6.tgz#f4c7ec43e81b319a9815115031709f26987891f0" - integrity sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw== - "@types/json5@^0.0.29": version "0.0.29" resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" @@ -1329,9 +1324,9 @@ camelcase@^6.0.0: integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== caniuse-lite@^1.0.30001093, caniuse-lite@^1.0.30001113, caniuse-lite@^1.0.30001154: - version "1.0.30001177" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001177.tgz#2c3b384933aafda03e29ccca7bb3d8c3389e1ece" - integrity sha512-6Ld7t3ifCL02jTj3MxPMM5wAYjbo4h/TAQGFTgv1inihP1tWnWp8mxxT4ut4JBEHLbpFXEXJJQ119JCJTBkYDw== + version "1.0.30001180" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001180.tgz#67abcd6d1edf48fa5e7d1e84091d1d65ab76e33b" + integrity sha512-n8JVqXuZMVSPKiPiypjFtDTXc4jWIdjxull0f92WLo7e1MSi3uJ3NvveakSh/aCl1QKFAvIz3vIj0v+0K+FrXw== chalk@2.4.2, chalk@^2.0.0, chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" @@ -2077,9 +2072,9 @@ ecdsa-sig-formatter@1.0.11, ecdsa-sig-formatter@^1.0.11: safe-buffer "^5.0.1" electron-to-chromium@^1.3.585: - version "1.3.640" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.640.tgz#94e68c0ae79181a1d6fd1ed9a42b9790d51a1bca" - integrity sha512-cU6wQdXYzuSPzLdszsa4whStYfmU7CVNnG6c5z6/z9YlCOQ2Xh/uKB1gTxlIRr0ubgSg1/dZuSbUAoeESeQ3sQ== + version "1.3.647" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.647.tgz#8f1750ab7a5137f1a9a27f8f4ebdf550e08ae10b" + integrity sha512-Or2Nu8TjkmSywY9hk85K/Y6il28hchlonITz30fkC87qvSNupQl29O12BzDDDTnUFlo6kEIFL2QGSpkZDMxH8g== elliptic@^6.5.3: version "6.5.3" @@ -2133,9 +2128,9 @@ enquirer@^2.3.5: ansi-colors "^4.1.1" entities@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/entities/-/entities-2.1.0.tgz#992d3129cf7df6870b96c57858c249a120f8b8b5" - integrity sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w== + version "2.2.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" + integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A== errno@^0.1.3, errno@~0.1.7: version "0.1.8" @@ -4312,9 +4307,9 @@ node-libs-browser@^2.2.1: vm-browserify "^1.0.1" node-releases@^1.1.65: - version "1.1.69" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.69.tgz#3149dbde53b781610cd8b486d62d86e26c3725f6" - integrity sha512-DGIjo79VDEyAnRlfSqYTsy+yoHd2IOjJiKUozD2MV2D85Vso6Bug56mb9tT/fY5Urt0iqk01H7x+llAruDR2zA== + version "1.1.70" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.70.tgz#66e0ed0273aa65666d7fe78febe7634875426a08" + integrity sha512-Slf2s69+2/uAD79pVVQo8uSiC34+g8GWY8UH2Qtqv34ZfhYrxpYpfzs9Js9d6O0mbDmALuxaTlplnBTnSELcrw== noop-logger@^0.1.1: version "0.1.1"