How to use the react-static.withRouteData function in react-static

To help you get started, we’ve selected a few react-static examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github spences10 / blog.scottspence.me / src / containers / Tag.js View on Github external
{tag.name}
            {blogPosts.map((post, index) => {
              return (
                
                  {post.title}
                
              )
            })}
          
        )
      })} */}
    
  )
}

export default withRouteData(Tag)
github jamesplease / materialish / docs / src / components / buttons.js View on Github external
Useful Links
        
        <ul>
          <li>
            <a href="{materialDocsLink}">
              <i> Material
              Guidelines
            </i></a><i>
          </i></li><i>
        </i></ul><i>
      
    );
  }
}

export default withRouteData(Buttons);
</i>
github JoshClose / CsvHelper / docs-src / docs / src / components / content.js View on Github external
render() {
		const { className, data } = this.props;

		if (!data) {
			return &lt;&gt;;
		}

		const markdown = marked(data);

		return (
			<div></div>
		);
	}
}

export default withSiteData(withRouteData(withRouter(Content)))
github jamesplease / materialish / docs / src / components / chips.js View on Github external
Useful Links
        
        <ul>
          <li>
            <a href="{materialDocsLink}">
              <i> Material
              Guidelines
            </i></a><i>
          </i></li><i>
        </i></ul><i>
      
    );
  }
}

export default withRouteData(Chips);
</i>
github spences10 / blog.scottspence.me / src / containers / About.js View on Github external
<img src="{`https://media.graphcms.com/resize=w:100,h:100,fit:crop/${" alt="{author.name}">
          <h1>Hello! My name is {author.name}</h1>
        
        <p>{author.bibliography}</p>
      
    ))}
  
)

export default withRouteData(About)
github DanWebb / danwebb.co / src / pages / article.js View on Github external
<content>
			
			<details title="{article.title}">
			{article.related &amp;&amp; (
				 article.related.indexOf(a.handle) &gt; -1)}/&gt;
			)}
		
	
);

Article.propTypes = {
	article: object.isRequired,
	articles: array.isRequired
};

export default withRouteData(Article);
</details></content>
github jamesplease / materialish / docs / src / icons / catalog.js View on Github external
resetSearch = () => {
    const { location } = this.props.history;
    const { pathname } = location;

    this.props.history.replace({
      pathname,
      query: {},
    });

    if (this.searchRef.current) {
      this.searchRef.current.focus();
    }
  };
}

export default withRouteData(IconsCatalog);
github jamesplease / materialish / docs / src / components / selection-controls.js View on Github external
Useful Links
        
        <ul>
          <li>
            <a href="{materialDocsLink}">
              <i> Material
              Guidelines
            </i></a><i>
          </i></li><i>
        </i></ul><i>
      
    );
  }
}

export default withRouteData(SelectionControls);
</i>