How to use the react-static.withSiteData 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 jamesplease / materialish / docs / src / common / nav.js View on Github external
this.state = {
      openStates,
    };
  }

  onNavigate = () => {
    const { isMenuOpen, onToggleMenu } = this.props;

    if (isMenuOpen) {
      onToggleMenu();
    }
  };
}

export default withSiteData(withRouteData(Nav));
github timberio / gitdocs / src / containers / Docs.js View on Github external
`

const page = ({ doc, config }) => (
  <Doc className="doc">
    <Markdown source={doc.body} config={config} />
    <Footer>
      {config.repository && (
        <a href={`${config.repository}/blob/master${doc.editPath}`}>
          <GitHub /> Edit this page
        </a>
      )}
    </Footer>
  </Doc>
)

export default withSiteData(withRouteData(page))
github iotaledger / documentation-platform / src / containers / Doc.js View on Github external
<div className="tablet-down-hidden">
                                <Feedback onSubmit={(data) => submitFeedback(this.props.apiEndpoint, this.props.location.pathname, data)} />
                            </div>
                        </BottomSticky>
                    )}
                </div>
                <Navigator
                    projects={this.props.projects}
                    pathname={this.props.location.pathname}
                />
            </Container>
        );
    }
}

export default withSiteData(withRouteData(withRouter(Doc)));
github iotaledger / documentation-platform / src / containers / NotFound.js View on Github external
<div data-depth="-0.02"><img src="/assets/document.svg" /></div>
                            <div data-depth="-0.04"><img src="/assets/document.svg" /></div>
                            <div data-depth="-0.06"><img src="/assets/document.svg" /></div>
                            <div data-depth="0.08"><img src="/assets/document.svg" /></div>
                            <div data-depth="-0.02"><img src="/assets/document.svg" /></div>
                            <div data-depth="-0.06"><img src="/assets/document.svg" /></div>
                            <div data-depth="0.08"><img src="/assets/document.svg" /></div>
                        </ParallaxContainer>
                    </aside>
                </section>
            </Container>
        );
    }
}

export default withSiteData(withRouteData(withRouter(NotFound)));
github JoshClose / CsvHelper / docs-src / docs2 / docs / src / components / content.js View on Github external
history.push(href);
		}
	}

	render() {
		const { className, data } = this.props;

		const markdown = marked(data);

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

export default withSiteData(withRouteData(withRouter(Content)))
github timberio / gitdocs / src / App.js View on Github external
<Router scrollToHashOffset={-40}>
        <Wrapper sidebarIsOpen={sidebarIsOpen}>
          <Sidebar
            tree={tree}
            config={config}
            sidebarIsOpen={sidebarIsOpen}
            onSidebarToggle={this.onSidebarToggle}
          />
          <Routes />
        </Wrapper>
      </Router>
    )
  }
}

export default hot(module)(withSiteData(App))
github desko27 / smash-tier-list / src / containers / SmashTierList.jsx View on Github external
SmashTierList.propTypes = {
  siteTitle: PropTypes.string.isRequired,
  siteRoot: PropTypes.string.isRequired,
  history: PropTypes.object.isRequired,
  route: PropTypes.string.isRequired,
  dispatch: PropTypes.func.isRequired,
  currentGame: PropTypes.object.isRequired,
  prevGame: PropTypes.object.isRequired,
  nextGame: PropTypes.object.isRequired,
  currentFilter: PropTypes.string.isRequired,
  eyeFilter: PropTypes.bool.isRequired,
  noMatch: PropTypes.bool.isRequired,
};

export default withSiteData(withRouter(
  connect(
    state => ({
      title: state.title,
      currentGame: currentGameSelector(state),
      prevGame: prevGameSelector(state),
      nextGame: nextGameSelector(state),
      currentFilter: state.currentFilter,
      eyeFilter: state.eyeFilter,
      noMatch: noMatchSelector(currentGameSelector(state)),
    }),
  )(SmashTierList),
));
github JoshClose / CsvHelper / docs-src / docs / src / pages / index.js View on Github external
<h3 className="title is-3">Sponsers</h3>
							<hr />

							<a href="https://opencollective.com/csvhelper/sponsor/0/website" rel="nofollow">
								<img src="https://camo.githubusercontent.com/8c4b18a584bc3d249062d169f460ee2d3b8f7373/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f63737668656c7065722f73706f6e736f722f302f6176617461722e737667" data-canonical-src="https://opencollective.com/csvhelper/sponsor/0/avatar.svg" style={{ maxWidth: "100%" }} />
							</a>
						</div>
					</div>
				</section>
			</div>
		);
	}
}

export default withSiteData(Home)
github JoshClose / CsvHelper / docs-src / docs / src / components / header.js View on Github external
</div>
				</nav>

				{/*
				The actual navbar above is fixed so we need to add the same amount of space
				to the top of the page so it's not hidden behind the header.
				*/}
				<div className="navbar">
				</div>
			</header>
		)
	}

}

export default withSiteData(Header)
github iotaledger / documentation-platform / src / containers / Home.js View on Github external
<BottomSticky zIndex={10} horizontalAlign='right'>
                                <div className="tablet-down-hidden">
                                    <Feedback onSubmit={(data) => submitFeedback(this.props.apiEndpoint, '/home/', data)} />
                                </div>
                            </BottomSticky>
                        )}
                    </div>
                    {this.props.viewData.enableSignup && (
                        <EmailSignup apiEndpoint={this.props.apiEndpoint} />
                    )}
                </Container>
            );
    }
}

export default withSiteData(Home);