This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { unified } from "unified"; | |
import markdown from "remark-parse"; | |
import slate, { defaultNodeTypes, serialize } from "remark-slate"; | |
const DEFAULT_HEADINGS = { | |
1: "h1", | |
2: "h2", | |
3: "h3", | |
4: "h4", | |
5: "h5", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { lazy } from 'react'; | |
const lazyWithRetry = (componentImport) => | |
lazy(async () => { | |
const pageHasAlreadyBeenForceRefreshed = JSON.parse( | |
window.localStorage.getItem( | |
'page-has-been-force-refreshed' | |
) || 'false' | |
); |