How to use the react-router-dom.Link function in react-router-dom

To help you get started, we’ve selected a few react-router-dom 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 jedireza / aqua / client / pages / main / home / index.jsx View on Github external
'use strict';
const React = require('react');
const ReactHelmet = require('react-helmet');
const ReactRouter = require('react-router-dom');


const Helmet = ReactHelmet.Helmet;
const Link = ReactRouter.Link;


class HomePage extends React.Component {
    render() {

        return (
            <section>
                
                    <title>Aqua</title>
                
                <div>
                    <h1>Success</h1>
                    <p>Your website and user system is ready.</p>
                </div>
                <div>
                    <div></div></div></section>
github z1c0 / dashydash / src / components / boards / home.jsx View on Github external
'use strict';
var React = require('react');
var RouterDOM = require('react-router-dom');
var Link = RouterDOM.Link;
var BoardManager = require('./boardManager.jsx');

class Home extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      boards : []
    };
  }

  componentDidMount() {
    this.boardSet = this.props.match.params.boardSetId || 'default';
    this.setState({ 
      boards : new BoardManager().getBoards(this.boardSet)
    });  
  }
github lbryio / spee.ch / client / build / containers / AssetInfo / view.js View on Github external
channelName = _this$props$asset$cla.channelName,
          certificateId = _this$props$asset$cla.certificateId,
          description = _this$props$asset$cla.description,
          name = _this$props$asset$cla.name,
          claimId = _this$props$asset$cla.claimId,
          fileExt = _this$props$asset$cla.fileExt,
          contentType = _this$props$asset$cla.contentType,
          thumbnail = _this$props$asset$cla.thumbnail,
          host = _this$props$asset$cla.host;
      return _react.default.createElement("div", null, channelName && _react.default.createElement(_Row.default, null, _react.default.createElement(_RowLabeled.default, {
        label: _react.default.createElement(_Label.default, {
          value: 'Channel:'
        }),
        content: _react.default.createElement("span", {
          className: "text"
        }, _react.default.createElement(_reactRouterDom.Link, {
          to: "/".concat(channelName, ":").concat(certificateId)
        }, channelName))
      })), _react.default.createElement(_Row.default, null, _react.default.createElement(_RowLabeled.default, {
        label: _react.default.createElement(_Label.default, {
          value: 'Share:'
        }),
        content: _react.default.createElement(_AssetShareButtons.default, {
          host: host,
          name: name,
          shortId: shortId
        })
      })), _react.default.createElement(_Row.default, null, _react.default.createElement(_RowLabeled.default, {
        label: _react.default.createElement(_Label.default, {
          value: 'Link:'
        }),
        content: _react.default.createElement(_ClickToCopy.default, {
github jedireza / aqua / client / pages / main / login / forgot / index.jsx View on Github external
'use strict';
const Actions = require('../actions');
const Button = require('../../../../components/form/button.jsx');
const ControlGroup = require('../../../../components/form/control-group.jsx');
const React = require('react');
const ReactHelmet = require('react-helmet');
const ReactRouter = require('react-router-dom');
const Spinner = require('../../../../components/form/spinner.jsx');
const Store = require('./store');
const TextControl = require('../../../../components/form/text-control.jsx');


const Helmet = ReactHelmet.Helmet;
const Link = ReactRouter.Link;


class ForgotPage extends React.Component {
    constructor(props) {

        super(props);

        this.input = {};
        this.state = Store.getState();
    }

    componentDidMount() {

        this.unsubscribeStore = Store.subscribe(this.onStoreChange.bind(this));

        if (this.input.email) {
github arnoldczhang / fe-guide / src / koa / example / koa-ssr / src / components / Header.js View on Github external
const Header = ({ loggedIn }) =>
  React.createElement(
    "div",
    null,
    React.createElement(react_router_dom_1.Link, { to: "/" }, "Home"),
    React.createElement(react_router_dom_1.Link, { to: "/about" }, "About"),
    React.createElement(react_router_dom_1.Link, { to: "/contact" }, "Contact"),
    loggedIn &&
      React.createElement(react_router_dom_1.Link, { to: "/secret" }, "Secret")
  );
const mapStateToProps = state => ({
github ZJU-CC98 / Forum / CC98.Forum / CC98.Forum / Components / post.js View on Github external
React.createElement("a", { href: url }, this.props.userName)),
                        React.createElement("div", { id: "topicsNumber", style: { marginLeft: "10px" } },
                            "\u8D34\u6570   ",
                            React.createElement("span", { className: "rpyClrodd" }, this.props.sendTopicNumber),
                            " ")),
                    React.createElement("div", { className: "row" },
                        React.createElement("div", { id: "clockimg", style: { marginLeft: "6px" } },
                            React.createElement("i", { className: "fa fa-clock-o fa-lg fa-fw" })),
                        React.createElement("div", null,
                            React.createElement("span", { className: "timeProp" }, moment(this.props.replyTime).format('YYYY-MM-DD HH:mm:ss'))))),
                React.createElement("div", { id: "operation" },
                    React.createElement("button", { className: "operation" }, "\u5F15\u7528"),
                    React.createElement("button", { className: "operation" }, "\u7F16\u8F91"),
                    React.createElement("button", { className: "operation" }, "\u79C1\u4FE1"),
                    React.createElement("button", { className: "operation" }, "\u4E3E\u62A5"),
                    React.createElement(react_router_dom_1.Link, { className: "operation", to: curUserPostUrl }, "\u53EA\u770B\u6B64\u7528\u6237"))));
    };
    return Replier;
github azat-co / react-quickly / ch18 / devcorpio_homework18_5 / nile / client / jsx / modal.jsx View on Github external
const React = require('react')
const Link = require('react-router-dom').Link

class Modal extends React.Component {
  constructor(props) {
    super(props)
    this.styles = {
      position: 'fixed',
      top: '20%',
      right: '20%',
      bottom: '20%',
      left: '20%',
      width: 450,
      height: 400,
      padding: 20,
      boxShadow: '0px 0px 150px 130px rgba(0, 0, 0, 0.5)',
      overflow: 'auto',
      background: '#fff'
github unosquare / uno-material-ui / docs / lib.30250b8a.js View on Github external
function HashLink(props) {
  return genericHashLink(props, _reactRouterDom.Link);
}
github jedireza / aqua / client / pages / main / login / reset / index.jsx View on Github external
'use strict';
const Actions = require('../actions');
const Button = require('../../../../components/form/button.jsx');
const ControlGroup = require('../../../../components/form/control-group.jsx');
const PropTypes = require('prop-types');
const React = require('react');
const ReactHelmet = require('react-helmet');
const ReactRouter = require('react-router-dom');
const Spinner = require('../../../../components/form/spinner.jsx');
const Store = require('./store');
const TextControl = require('../../../../components/form/text-control.jsx');


const Helmet = ReactHelmet.Helmet;
const Link = ReactRouter.Link;
const propTypes = {
    match: PropTypes.object
};


class ResetPage extends React.Component {
    constructor(props) {

        super(props);

        this.input = {};
        this.state = Store.getState();
    }

    componentDidMount() {
github Asing1001 / movieRater.React / dist / app / components / movieCard.js View on Github external
render() {
        const { roomTypes, movie, timesStrings } = this.props;
        return (React.createElement("article", { className: "card", style: { display: 'flex' } },
            React.createElement(react_router_dom_1.Link, { to: `/movie/${movie.yahooId}` },
                React.createElement(react_lazyload_1.default, null,
                    React.createElement("img", { className: "poster", src: this.getSmallPosterSrc(movie), alt: "Image not found" }))),
            React.createElement("div", { className: "col-xs-12" },
                React.createElement("header", { style: { paddingTop: '.5em' } },
                    React.createElement(react_router_dom_1.Link, { style: { color: 'inherit' }, to: `/movie/${movie.yahooId}` },
                        React.createElement("h3", { className: "title" },
                            movie.chineseTitle,
                            roomTypes && roomTypes.length > 0 && React.createElement("span", { style: { marginLeft: '.2em' } }, roomTypes.map((roomType, index) => roomType)))),
                    React.createElement(react_router_dom_1.Link, { style: { color: 'inherit' }, to: `/movie/${movie.yahooId}` },
                        React.createElement("small", null, movie.englishTitle))),
                React.createElement("div", { className: "resultInfo" },
                    React.createElement(react_router_dom_1.Link, { style: { color: 'inherit' }, to: `/movie/${movie.yahooId}` },
                        React.createElement("div", null,
                            "\u4E0A\u6620\u65E5\u671F\uFF1A",
                            movie.releaseDate || '未提供'),
                        React.createElement("div", { className: "hidden-xs" },
                            "\u985E\u578B\uFF1A",
                            movie.types.join('、') || '未提供'),
                        React.createElement("div", null,
                            "\u7247\u9577\uFF1A",
                            movie.runTime))),