Skip to content

Commit

Permalink
Use react-helmet props rather than children
Browse files Browse the repository at this point in the history
Avoids the error at nfl/react-helmet#373 where the maximum call stack
size is exceeded because of a deepEqual on React children.
  • Loading branch information
rosszurowski committed Dec 12, 2018
1 parent 51e2a8a commit 98c4e19
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 18 deletions.
4 changes: 1 addition & 3 deletions src/views/about-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ const QuestionContainer = ({ id, question, children }) => (

export default () => (
<HomeLayout>
<Head>
<title>About</title>
</Head>
<Head title="About" />
<Header />
<ScrollReset />
<div className="mw-500 mh-auto pt-4 pt-5-m">
Expand Down
4 changes: 1 addition & 3 deletions src/views/log-in-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,7 @@ class LogInView extends Component<Props, State> {

return (
<div className="mh-100vh c-gray4 bgc-offwhite fs-16 fs-18-m">
<Head>
<title>Log In</title>
</Head>
<Head title="Log In" />
<HomeHeader />
<div className="pt-4 ph-3 mw-500 mh-auto ta-center">
{hasUniqueRedirect &&
Expand Down
4 changes: 1 addition & 3 deletions src/views/log-out-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ class LogOutView extends Component<Props> {
render() {
return (
<HomeLayout>
<Head>
<title>Logging out</title>
</Head>
<Head title="Logging out" />
<div className="pa-3 x xd-column xa-center xj-center mh-100vh">
<p>Logging out...</p>
</div>
Expand Down
4 changes: 1 addition & 3 deletions src/views/not-found-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ import HomeLayout from '../components/home-layout';

export default () => (
<HomeLayout>
<Head>
<title>Not found</title>
</Head>
<Head title="Not Found" />
<div className="pa-3 x xd-column xa-center xj-center mh-100vh">
<div className="mb-4">
<svg
Expand Down
4 changes: 1 addition & 3 deletions src/views/reader-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,7 @@ class ReaderView extends Component<Props> {

return (
<Fragment>
<Head>
<title>{`${series.title}${chapterLabel}`}</title>
</Head>
<Head title={`${series.title}${chapterLabel}`} />
<div className="pt-5 pb-4 mh-auto w-90p-m ta-center mw-900">
<div className="pt-4">
<ReaderPageImageList pages={chapter.pages} />
Expand Down
4 changes: 1 addition & 3 deletions src/views/series-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,7 @@ const SeriesPage = ({
return (
<div className="pb-5">
<ScrollReset />
<Head>
<title>{series.title}</title>
</Head>
<Head title={series.title} />
<div className="mw-600 w-100p mh-auto p-relative">
<header className="p-relative z-3 x xa-center xj-spaceBetween pa-2 mb-3 c-white">
<BackButtonContainer>
Expand Down

0 comments on commit 98c4e19

Please sign in to comment.