ff-stream-web

git clone git://archive.git.mtrnord.blog/MTRNord/ff-stream-web.git
Log | Files | Refs | README | LICENSE

commit 30994946ae92f3c73b6ca6c798d40e418573b033
parent e2298b1d75bc0036b20d157c6ea2d92661958bc1
Author: Konstantin Tarkus <koistya@gmail.com>
Date:   Mon,  9 Feb 2015 09:03:26 +0300

Merge pull request #63 from goatslacker/rm-link

Removes component Link
Diffstat:
Dsrc/components/Link/Link.js | 39---------------------------------------
Dsrc/components/Link/package.json | 6------
2 files changed, 0 insertions(+), 45 deletions(-)

diff --git a/src/components/Link/Link.js b/src/components/Link/Link.js @@ -1,39 +0,0 @@ -/* - * React.js Starter Kit - * Copyright (c) 2014 Konstantin Tarkus (@koistya), KriaSoft LLC. - * - * This source code is licensed under the MIT license found in the - * LICENSE.txt file in the root directory of this source tree. - */ - -'use strict'; - -var React = require('react'); -var AppActions = require('../../actions/AppActions'); - -var Link = React.createClass({ - - propTypes: { - to: React.PropTypes.string.isRequired - }, - - render() { - this.props.href = - this.props.to && this.props.to.lastIndexOf('/', 0) === 0 ? - this.props.to : '/' + this.props.to; - - return ( - /* jshint ignore:start */ - <a onClick={this.handleClick} {...this.props}>{this.props.children}</a> - /* jshint ignore:end */ - ); - }, - - handleClick(e) { - e.preventDefault(); - AppActions.navigateTo(this.props.to); - } - -}); - -module.exports = Link; diff --git a/src/components/Link/package.json b/src/components/Link/package.json @@ -1,6 +0,0 @@ -{ - "name": "Link", - "version": "0.0.0", - "private": true, - "main": "./Link.js" -}