Skip to content

Commit

Permalink
Add defer=false to all <Helmet> elements
Browse files Browse the repository at this point in the history
If defer is true (default value) the document title isn't updated while browser tab is inactive.

See nfl/react-helmet#314 and  https://freefeed.net/support/5bd48fee-226c-4393-beca-0fa7e94398a5#comment-ef68b416-6eb9-415e-ab33-c5562e6dc977 (bug report)
  • Loading branch information
davidmz committed May 1, 2020
1 parent c0556ea commit c8c3ec6
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/all-groups.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default function AllGroups() {

return (
<div className="content">
<Helmet title={`All Groups - ${CONFIG.siteTitle}`} />
<Helmet title={`All Groups - ${CONFIG.siteTitle}`} defer={false} />
<div className="box">
<div className="box-header-timeline">All Groups</div>
<div className="box-body">
Expand Down
2 changes: 1 addition & 1 deletion src/components/color-theme-setter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class ColorSchemeSetterBase extends Component {

render() {
return (
<Helmet>
<Helmet defer={false}>
<meta name="theme-color" content={this.props.darkTheme ? 'hsl(220, 9%, 10%)' : 'white'} />
</Helmet>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/group-settings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default function GroupSettings({ params: { userName: username } }) {
function Layout({ username, children }) {
return (
<div className="box">
<Helmet title={`'${username}' group settings - ${CONFIG.siteTitle}`} />
<Helmet title={`'${username}' group settings - ${CONFIG.siteTitle}`} defer={false} />
<div className="box-header-timeline">Group settings</div>
<div className="box-body">{children}</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/layout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class Layout extends React.Component {
return (
<div className={layoutClassNames}>
<ErrorBoundary>
<Helmet title={props.title} />
<Helmet title={props.title} defer={false} />
<ColorSchemeSetter />
<SVGSymbolDeclarations />

Expand Down
2 changes: 1 addition & 1 deletion src/components/settings/layout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export default function Layout({ children, router }) {
export function SettingsPage({ title, header = title, children }) {
return (
<>
<Helmet title={title} />
<Helmet title={title} defer={false} />
<h3 className={styles.pageHeader}>{header}</h3>
{children}
</>
Expand Down

0 comments on commit c8c3ec6

Please sign in to comment.