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.

github spences10 / blog.scottspence.me / src / containers / Tag.js View on Github external
<TagTitle innerRef={tag.name}>{tag.name}</TagTitle>
            {blogPosts.map((post, index) => {
              return (
                <ListTags key={index}>
                  <TagLink to={post.slug}>{post.title}</TagLink>
                </ListTags>
              )
            })}
          </LinkWrapper>
        )
      })} */}
    </PageWrapper>
  )
}

export default withRouteData(Tag)
github jamesplease / materialish / docs / src / components / buttons.js View on Github external
Useful Links
        </h2>
        <ul className="componentDoc_links">
          <li className="componentDoc_linkItem">
            <a href={materialDocsLink} className="componentDoc_linkAnchor">
              <i className="componentDoc_icon zmdi zmdi-file-text" /> Material
              Guidelines
            </a>
          </li>
        </ul>
      </div>
    );
  }
}

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

		if (!data) {
			return <></>;
		}

		const markdown = marked(data);

		return (
			<div ref={this.divRef} className={className} dangerouslySetInnerHTML={{ __html: markdown }}></div>
		);
	}
}

export default withSiteData(withRouteData(withRouter(Content)))
github jamesplease / materialish / docs / src / components / chips.js View on Github external
Useful Links
        </h2>
        <ul className="componentDoc_links">
          <li className="componentDoc_linkItem">
            <a href={materialDocsLink} className="componentDoc_linkAnchor">
              <i className="componentDoc_icon zmdi zmdi-file-text" /> Material
              Guidelines
            </a>
          </li>
        </ul>
      </div>
    );
  }
}

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

export default withRouteData(About)
github DanWebb / danwebb.co / src / pages / article.js View on Github external
<Content>
			<Text>{convert(article.contents)}</Text>
			<Details title={article.title} handle={article.handle}/>
			{article.related && (
				<Related articles={articles.filter(a => article.related.indexOf(a.handle) > -1)}/>
			)}
		</Content>
	</Layout>
);

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

export default withRouteData(Article);
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
        </h2>
        <ul className="componentDoc_links">
          <li className="componentDoc_linkItem">
            <a href={materialDocsLink} className="componentDoc_linkAnchor">
              <i className="componentDoc_icon zmdi zmdi-file-text" /> Material
              Guidelines
            </a>
          </li>
        </ul>
      </div>
    );
  }
}

export default withRouteData(SelectionControls);