Removed copy from redirect page, reduced delay to 0s for js and meta

This commit is contained in:
Eric Nakagawa 2017-10-19 13:15:05 -07:00
parent 57251a22c0
commit a9571ebf4d
3 changed files with 3 additions and 9 deletions

View file

@ -40,7 +40,7 @@ class Head extends React.Component {
{this.props.redirect && ( {this.props.redirect && (
<meta <meta
http-equiv="refresh" http-equiv="refresh"
content={"2; URL=" + this.props.redirect} content={"0; URL=" + this.props.redirect}
/> />
)} )}
<link <link

View file

@ -45,17 +45,11 @@ class Redirect extends React.Component {
redirect={redirect} redirect={redirect}
/> />
<body className={this.props.className}> <body className={this.props.className}>
The page you are looking for has moved. If you are not redirected to
the new page in three seconds, then you can navigate to the new page
by using <a href={this.props.redirect}>this link</a>.
<script <script
dangerouslySetInnerHTML={{ dangerouslySetInnerHTML={{
__html: ` __html: `
<!-- <!--
window.setTimeout( window.location.href = "${this.props.redirect}";
function(){window.location.href = "${this.props
.redirect}"},3000
);
// --> // -->
` `
}} }}

View file

@ -202,7 +202,7 @@ function execute() {
metadata={metadata} metadata={metadata}
language={language} language={language}
config={siteConfig} config={siteConfig}
redirect={"/" + siteConfig.baseUrl + metadata.permalink} redirect={siteConfig.baseUrl + metadata.permalink}
/> />
); );
const redirectStr = renderToStaticMarkup(redirectComp); const redirectStr = renderToStaticMarkup(redirectComp);