commit stringlengths 40 40 | old_file stringlengths 4 150 | new_file stringlengths 4 150 | old_contents stringlengths 0 3.26k | new_contents stringlengths 1 4.43k | subject stringlengths 15 501 | message stringlengths 15 4.06k | lang stringclasses 4
values | license stringclasses 13
values | repos stringlengths 5 91.5k | diff stringlengths 0 4.35k |
|---|---|---|---|---|---|---|---|---|---|---|
4a4d2eabbbb52a0471f8b885c54ba2134e7fb8a3 | src/app/components/Modal/InfoModalContainer.jsx | src/app/components/Modal/InfoModalContainer.jsx | import PropTypes from 'prop-types'
import React from 'react'
import { connect } from 'react-redux'
import { isEmbedded } from '../../../shared/ducks/ui/ui'
import SHARED_CONFIG from '../../../shared/services/shared-config/shared-config'
import { createCookie, getCookie } from '../../utils/cookie'
import useDataFetching... | import PropTypes from 'prop-types'
import React from 'react'
import { connect } from 'react-redux'
import { isEmbedded } from '../../../shared/ducks/ui/ui'
import SHARED_CONFIG from '../../../shared/services/shared-config/shared-config'
import { createCookie, getCookie } from '../../utils/cookie'
import useDataFetching... | Change expiration time of the info modal cookie | Change expiration time of the info modal cookie
| JSX | mpl-2.0 | DatapuntAmsterdam/atlas,Amsterdam/atlas,DatapuntAmsterdam/atlas_prototype,Amsterdam/atlas,DatapuntAmsterdam/atlas,DatapuntAmsterdam/atlas,Amsterdam/atlas,Amsterdam/atlas,DatapuntAmsterdam/atlas_prototype | ---
+++
@@ -25,7 +25,7 @@
<InfoModal
id="infoModal"
{...{ open: true, title, body: body.value }}
- closeModalAction={() => createCookie(COOKIE_NAME, '1')}
+ closeModalAction={() => createCookie(COOKIE_NAME, '8')}
/>
)
} |
51334dff3b5b58ea495dffe608a11adbf9aa81c7 | client/components/ChatClient.jsx | client/components/ChatClient.jsx | import React from 'react';
import sendChatMessage from './../actions';
import ChatMessagesDisplay from './ChatMessagesDisplay.jsx';
class ChatClient extends React.Component {
constructor(props) {
super(props);
this.state = {
store: props.store,
message: '',
user: props.username
};
}
... | import React from 'react';
import { sendChatMessage } from './../actions';
import ChatMessagesDisplay from './ChatMessagesDisplay.jsx';
class ChatClient extends React.Component {
constructor(props) {
super(props);
this.state = {
store: props.store,
message: '',
user: props.username
};
... | Enable posting to slack from React component's input | Enable posting to slack from React component's input
| JSX | mit | enchanted-spotlight/Plato,enchanted-spotlight/Plato | ---
+++
@@ -1,5 +1,5 @@
import React from 'react';
-import sendChatMessage from './../actions';
+import { sendChatMessage } from './../actions';
import ChatMessagesDisplay from './ChatMessagesDisplay.jsx';
@@ -23,11 +23,11 @@
// Form is not properly re rendering after setState
// Redux... |
0ae12e2faa40aa8ad2c5fb1edce7c380a2d48338 | client/components/App.jsx | client/components/App.jsx | import React from 'react';
import ReactDOM from 'react-dom';
import { Router, Route, hashHistory, IndexRoute } from 'react-router';
import TextView from './TextView.jsx';
import SpeechView from './SpeechView.jsx';
import Nav from './Nav.jsx';
import LandingPage from './LandingPage.jsx';
class App extends React.Compone... | import React from 'react';
import ReactDOM from 'react-dom';
import { Router, Route, hashHistory, IndexRoute } from 'react-router';
import TextView from './TextView.jsx';
import SpeechView from './SpeechView.jsx';
import Nav from './Nav.jsx';
import LandingPage from './LandingPage.jsx';
class App extends React.Compone... | Add onLandingPage flag to state and passed down to Nav | Add onLandingPage flag to state and passed down to Nav
| JSX | mit | alexxisroxxanne/SpeechDoctor,alexxisroxxanne/SpeechDoctor,nonchalantkettle/SpeechDoctor,nonchalantkettle/SpeechDoctor | ---
+++
@@ -10,20 +10,21 @@
constructor(props) {
super(props);
this.state = {
- showText: false,
+ // showText: false,
+ onLandingPage: true,
};
}
handleClick() {
this.setState({
- showText: true,
+ onLandingPage: false,
});
}
render() {
return... |
e595a70e8d195ab0f8d2173c70fff28602e8fc95 | src/_shared/DateTextField.jsx | src/_shared/DateTextField.jsx | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import moment from 'moment';
import { TextField } from 'material-ui';
export default class DateTextField extends Component {
static propTypes = {
value: PropTypes.oneOfType([
PropTypes.object,
PropTypes.string,
PropTy... | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import moment from 'moment';
import { TextField } from 'material-ui';
export default class DateTextField extends Component {
static propTypes = {
value: PropTypes.oneOfType([
PropTypes.object,
PropTypes.string,
PropTy... | Fix onClick working issue for disabeld pickers | Fix onClick working issue for disabeld pickers
| JSX | mit | dmtrKovalenko/material-ui-pickers,callemall/material-ui,dmtrKovalenko/material-ui-pickers,mui-org/material-ui,oliviertassinari/material-ui,callemall/material-ui,rscnt/material-ui,mui-org/material-ui,rscnt/material-ui,rscnt/material-ui,mbrookes/material-ui,callemall/material-ui,callemall/material-ui,mbrookes/material-ui... | ---
+++
@@ -11,8 +11,14 @@
PropTypes.number,
PropTypes.instanceOf(Date),
]).isRequired,
+ disabled: PropTypes.bool,
format: PropTypes.string.isRequired,
+ onClick: PropTypes.func.isRequired,
// onChange: PropTypes.func.isRequired,
+ }
+
+ static defaultProps = {
+ disabled: fal... |
e76659215bb45a7727c41122297309d7a7ff3ae7 | src/react/components/Root.jsx | src/react/components/Root.jsx | import React from 'react';
export function rootComponent(action$, state$, init){
return ComposedComponent => {
class Root extends React.Component {
componentWillMount(){
this.state = { action$, state$ };
init();
}
getChildContext() {
... | import React from 'react';
export function rootComponent(action$, state$, init){
return ComposedComponent => {
class Root extends React.Component {
componentWillMount(){
this.state = { action$, state$ };
}
componentDidMount(){
init();
... | Fix race condition when initializing the app | Fix race condition when initializing the app | JSX | mit | jairtrejo/madera | ---
+++
@@ -6,6 +6,9 @@
class Root extends React.Component {
componentWillMount(){
this.state = { action$, state$ };
+ }
+
+ componentDidMount(){
init();
}
|
b45ba187b2d312e6d6695c0b9a05be3899c7e5c2 | client/components/LandingButton.jsx | client/components/LandingButton.jsx | import React from 'react';
class LandingButton extends React.Component {
constructor(props) {
super(props);
this.state = {
showText: false,
};
}
handleClick() {
this.setState({
showText: true,
});
}
render() {
return (
<h1>LandingView</h1>
);
}
}
| import React from 'react';
import { Link } from 'react-router';
export default class LandingButton extends React.Component {
constructor(props) {
super(props);
this.state = {
showText: false,
};
}
render() {
return (
<div id="landingButton">
<Link
onClick={this.prop... | Add correct landingButton from github | Add correct landingButton from github
| JSX | mit | alexxisroxxanne/SpeechDoctor,nonchalantkettle/SpeechDoctor,nonchalantkettle/SpeechDoctor,alexxisroxxanne/SpeechDoctor | ---
+++
@@ -1,6 +1,7 @@
import React from 'react';
+import { Link } from 'react-router';
-class LandingButton extends React.Component {
+export default class LandingButton extends React.Component {
constructor(props) {
super(props);
this.state = {
@@ -8,14 +9,15 @@
};
}
- handleClick() {
- ... |
0737e652ee17b27d3db61925a83d1b736e298639 | src/AppDrawer/components/MenuLabel.jsx | src/AppDrawer/components/MenuLabel.jsx | import React from 'react'
import PropTypes from 'prop-types'
import RenderToLayer from 'material-ui/internal/RenderToLayer'
import { injectStylesSheet } from './DrawerStyles'
import MenuItemFlyOut from './MenuItemFlyOut'
class MenuLabel extends React.Component {
state = {
top: 0,
}
handleResize = (e) => {... | import React from 'react'
import PropTypes from 'prop-types'
import RenderToLayer from 'material-ui/internal/RenderToLayer'
import { injectStylesSheet } from './DrawerStyles'
import MenuItemFlyOut from './MenuItemFlyOut'
class MenuLabel extends React.Component {
state = {
top: 0,
}
handleResize = (e) => {... | Fix 'can't find parent node of null' on menu item removed | Fix 'can't find parent node of null' on menu item removed
| JSX | mit | mindhivenz/mui-components | ---
+++
@@ -25,6 +25,10 @@
componentDidMount() {
this.handleResize()
+ }
+
+ componentWillUnmount() {
+ clearTimeout(this.deferTimer)
}
render = () => { |
5630f279951aba88d5282e65cfd30206064e6e4f | src/app/App.jsx | src/app/App.jsx | import React, { Component } from 'react';
import { Provider } from 'react-redux';
import { Router, browserHistory } from 'react-router';
import routes from './config/routes';
import store from './config/store'
export default class App extends Component {
constructor(props) {
super(props)
}
render... | import React, { Component } from 'react';
import { Provider } from 'react-redux';
import { Router, Route, browserHistory } from 'react-router';
import Layout from './global/Layout'
import Collections from './collections/Collections';
import Login from './login/Login';
import routes from './config/routes';
import stor... | Add layout wrapper component and routes | Add layout wrapper component and routes
Former-commit-id: 44f95ad2bbd79a75824168ddd30eb2edd8af1923
Former-commit-id: 3d57a39c6f0de0b4ffba1dc52dc126e27efd31e5
Former-commit-id: 9ddfd2a6054388d3dce4b825bcc7d9cc2ea5380c | JSX | mit | ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence | ---
+++
@@ -1,6 +1,10 @@
import React, { Component } from 'react';
import { Provider } from 'react-redux';
-import { Router, browserHistory } from 'react-router';
+import { Router, Route, browserHistory } from 'react-router';
+
+import Layout from './global/Layout'
+import Collections from './collections/Collection... |
525bd22fc3f3fc1de06b38291c379fa4680699d5 | app/js/pages/Home.jsx | app/js/pages/Home.jsx | import React from 'react';
import asyncComponent from 'components/general/AsyncComponent';
import Hero from 'components/home/Hero';
import 'scss/home.scss';
// Load the events list async from the Events Chunck
const HomeEvents = asyncComponent(
() => import(/* webpackChunkName: "Events" */ 'containers/events/HomeEve... | import React from 'react';
import asyncComponent from 'components/general/AsyncComponent';
import Hero from 'components/home/Hero';
import 'scss/home.scss';
// Load the events list async from the Events Chunck
const HomeEvents = asyncComponent(
() => import(/* webpackChunkName: "Events" */ 'containers/events/HomeEve... | Change "hold" to "holds" on the homepage. | Change "hold" to "holds" on the homepage.
| JSX | mit | rit-sse/OneRepoToRuleThemAll | ---
+++
@@ -18,7 +18,7 @@
<h4 className="front-heading">Mentoring <small>10am - 6pm, Mon - Fri</small></h4>
<p>
The SSE has a mentor on duty every day that can help with SE, CS and other technical classes.
- There is also a physics tutor who hold open mentoring hours in our lab.
... |
4a4b8815e51a11deb17d57696a8d7a5b87bb2a6d | src/views/preview/stats.jsx | src/views/preview/stats.jsx | const PropTypes = require('prop-types');
const React = require('react');
const FlexRow = require('../../components/flex-row/flex-row.jsx');
const classNames = require('classnames');
const CappedNumber = require('../../components/cappednumber/cappednumber.jsx');
const projectShape = require('./projectshape.jsx').projec... | const PropTypes = require('prop-types');
const React = require('react');
const FlexRow = require('../../components/flex-row/flex-row.jsx');
const classNames = require('classnames');
const projectShape = require('./projectshape.jsx').projectShape;
require('./stats.scss');
const Stats = props => (
<FlexRow classNa... | Remove "CappedNumber" from view count on project page. | Remove "CappedNumber" from view count on project page.
| JSX | bsd-3-clause | LLK/scratch-www,LLK/scratch-www | ---
+++
@@ -3,7 +3,6 @@
const FlexRow = require('../../components/flex-row/flex-row.jsx');
const classNames = require('classnames');
-const CappedNumber = require('../../components/cappednumber/cappednumber.jsx');
const projectShape = require('./projectshape.jsx').projectShape;
require('./stats.scss');
@@ -34... |
9e461704f0994bd0666e799c281b8b19aa2aa26f | client/public/js/components/view.jsx | client/public/js/components/view.jsx | import React from 'react';
import CircularProgress from 'material-ui/CircularProgress';
// import MDTSelector from 'mdt-selector';
import { Molecule3d } from 'molecule-3d-for-react';
import WorkflowNodeRecord from '../records/workflow_node_record';
import viewEmptyImage from '../../img/view_empty.png';
require('../../... | import React from 'react';
import CircularProgress from 'material-ui/CircularProgress';
// import MDTSelector from 'mdt-selector';
import { Nbmolviz3dReact } from 'molecule-3d-for-react';
import WorkflowNodeRecord from '../records/workflow_node_record';
import viewEmptyImage from '../../img/view_empty.png';
require('.... | Use nbmolviz name from molecule3d repo, because of old commit | Use nbmolviz name from molecule3d repo, because of old commit
| JSX | apache-2.0 | Autodesk/molecular-design-applications,Autodesk/molecular-design-applications,Autodesk/molecular-design-applications,Autodesk/molecular-simulation-tools,Autodesk/molecular-simulation-tools,Autodesk/molecular-simulation-tools | ---
+++
@@ -1,7 +1,7 @@
import React from 'react';
import CircularProgress from 'material-ui/CircularProgress';
// import MDTSelector from 'mdt-selector';
-import { Molecule3d } from 'molecule-3d-for-react';
+import { Nbmolviz3dReact } from 'molecule-3d-for-react';
import WorkflowNodeRecord from '../records/workf... |
ef616fa517790def236ab1e94ecb816c45194563 | src/components/post-attachment-audio.jsx | src/components/post-attachment-audio.jsx | import React from 'react'
import numeral from 'numeral'
export default (props) => {
const formattedFileSize = numeral(props.fileSize).format('0.[0] b')
const nameAndSize = props.fileName + ' (' + formattedFileSize + ')'
return (
<div className='attachment'>
<div>
<audio src={props.url} preload... | import React from 'react'
import numeral from 'numeral'
export default (props) => {
const formattedFileSize = numeral(props.fileSize).format('0.[0] b')
let artistAndTitle = ''
if (props.title && props.artist) {
artistAndTitle = props.artist + ' – ' + props.title + ' (' + formattedFileSize + ')'
} else if ... | Add tooltip with artist name and track title (for audio) | [attachments] Add tooltip with artist name and track title (for audio)
| JSX | mit | ujenjt/freefeed-react-client,clbn/freefeed-react-client,clbn/freefeed-gamma,FreeFeed/freefeed-react-client,kadmil/freefeed-react-client,FreeFeed/freefeed-html-react,FreeFeed/freefeed-html-react,FreeFeed/freefeed-react-client,FreeFeed/freefeed-html-react,kadmil/freefeed-react-client,kadmil/freefeed-react-client,davidmz/... | ---
+++
@@ -3,17 +3,25 @@
export default (props) => {
const formattedFileSize = numeral(props.fileSize).format('0.[0] b')
- const nameAndSize = props.fileName + ' (' + formattedFileSize + ')'
+
+ let artistAndTitle = ''
+ if (props.title && props.artist) {
+ artistAndTitle = props.artist + ' – ' + props.t... |
7621bb7a65b4b2ad411d506dc219dabb6a1b2d5d | Todo-Redux/app/store/configureStore.jsx | Todo-Redux/app/store/configureStore.jsx | import {combineReducers, createStore, compose} from 'redux';
import {searchTextReducer, showCompletedReducer, tasksReducer} from 'reducers';
export var configure = () => {
var reducer = combineReducers({
searchText: searchTextReducer,
showCompleted: showCompletedReducer,
tasks: ... | import {combineReducers, createStore, compose} from 'redux';
import {searchTextReducer, showCompletedReducer, tasksReducer} from 'reducers';
export var configure = (initialState = {}) => {
var reducer = combineReducers({
searchText: searchTextReducer,
showCompleted: showCompletedReducer,... | Add initialState to store configure | Add initialState to store configure
| JSX | mit | JulianNicholls/Complete-React-Web-App,JulianNicholls/Complete-React-Web-App | ---
+++
@@ -1,14 +1,14 @@
import {combineReducers, createStore, compose} from 'redux';
import {searchTextReducer, showCompletedReducer, tasksReducer} from 'reducers';
-export var configure = () => {
+export var configure = (initialState = {}) => {
var reducer = combineReducers({
searchText... |
89535cc167578137c7d10c689bced344d2d5f9f5 | web/src/js/components/VideoContainer.jsx | web/src/js/components/VideoContainer.jsx | import React from 'react';
import PropTypes from 'prop-types';
import YouTube from 'react-youtube';
import Paper from 'material-ui/Paper';
class VideoContainer extends React.Component {
render() {
const opts = {
width: '100%',
playerVars: {
autoplay: 0
}
};
return (
<... | import React from 'react';
import PropTypes from 'prop-types';
import YouTube from 'react-youtube';
import Paper from 'material-ui/Paper';
class VideoContainer extends React.Component {
render() {
const opts = {
width: '100%',
playerVars: {
autoplay: 0
}
};
return (
<... | Revert "fix everything probably in this one bit" | Revert "fix everything probably in this one bit"
This reverts commit a6b678dd3fa0c9a2b64c2db2706ab28ef801de09.
| JSX | mit | upnextfm/upnextfm,upnextfm/upnextfm,upnextfm/upnextfm,upnextfm/upnextfm | ---
+++
@@ -12,10 +12,12 @@
};
return (
- <Paper elevation = {4} className = "up-room__paper_container up-room__video">
- <YouTube videoId="NegV-ts35cY" opts={opts} />
- <div className = "up-room__video_buttons"><p>BUTTONS GO HERE</p></div>
- </Paper>
+ <div className="up-room... |
bd7ea1eff8dc6752982506594f9ff55d5496ff56 | frontend/src/components/RouteMap.jsx | frontend/src/components/RouteMap.jsx | import React from 'react';
import { setDefaultOptions, loadModules } from 'esri-loader';
import './RouteMap.css';
class RouteMap extends React.Component {
constructor(props) {
super(props);
this.state = {
isLoaded: false
};
setDefaultOptions({ css: true });
lo... | import React from 'react';
import { setDefaultOptions, loadModules } from 'esri-loader';
import './RouteMap.css';
class RouteMap extends React.Component {
constructor(props) {
super(props);
this.state = {
isLoaded: false
};
}
componentDidMount() {
setDefaultOpt... | Move map initialization to componentDidMount() function | Move map initialization to componentDidMount() function
This prevents an (unlikely) but possible race condition that would cause an error when calling this.setState().
| JSX | agpl-3.0 | Acizza/srfinder,Acizza/srfinder,Acizza/srfinder,Acizza/srfinder | ---
+++
@@ -9,7 +9,9 @@
this.state = {
isLoaded: false
};
+ }
+ componentDidMount() {
setDefaultOptions({ css: true });
loadModules(["esri/Map", "esri/views/MapView", "esri/widgets/BasemapToggle"]).then(([Map, MapView, BasemapToggle]) => { |
e717982645f6a3f6f3e685cdd795afdf07eab9be | components/search-bar.jsx | components/search-bar.jsx | var React = require('react');
var SearchBar = React.createClass({
getDefaultProps: function() {
return {
minlength: 3,
onChange: function() {}
};
},
render: function() {
return <input type='text' placeholder='Search' ref='query' onInput={ this.update } />;
... | var React = require('react');
var SearchBar = React.createClass({
getDefaultProps: function() {
return {
minlength: 2,
onChange: function() {}
};
},
render: function() {
return <input type='text' placeholder='Search' ref='query' onInput={ this.update } />;
... | Reduce default minlength to 2 | Reduce default minlength to 2
| JSX | mit | meirwah/react-json-inspector,meirwah/react-json-inspector | ---
+++
@@ -3,7 +3,7 @@
var SearchBar = React.createClass({
getDefaultProps: function() {
return {
- minlength: 3,
+ minlength: 2,
onChange: function() {}
};
}, |
11b9dacab7a1980a0573a671ec4c5d22dddb121b | src/components/ArticleController.jsx | src/components/ArticleController.jsx | import React from 'react';
import Article from 'components/Article';
import FalcorController from 'lib/falcor/FalcorController';
export default class ArticleController extends FalcorController {
static getFalcorPath(params) {
// Format: thegazelle.org/issue/:issueId/:articleCategory/:articleSlug
return ["iss... | import React from 'react';
import Article from 'components/Article';
import FalcorController from 'lib/falcor/FalcorController';
export default class ArticleController extends FalcorController {
static getFalcorPath(params) {
// Format: thegazelle.org/issue/:issueId/:articleCategory/:articleSlug
return ["iss... | Fix article Falcor path bug | Fix article Falcor path bug
| JSX | mit | thegazelle-ad/gazelle-server,thegazelle-ad/gazelle-server,thegazelle-ad/gazelle-server,thegazelle-ad/gazelle-server,thegazelle-ad/gazelle-server,thegazelle-ad/gazelle-front-end,thegazelle-ad/gazelle-front-end | ---
+++
@@ -11,7 +11,11 @@
render() {
console.log("RENDERING ARTICLE CONTROLLER");
if (this.state.ready) {
- const articleData = this.state.data.articles[this.props.params.articleSlug];
+ var issueId = this.props.params.issueId;
+ var articleCategory = this.props.params.articleCategory;
+ ... |
0df11d9ec9f79e8abf42f78d9c8a6d744bd6218b | packages/lesswrong/components/posts/BookmarksPage.jsx | packages/lesswrong/components/posts/BookmarksPage.jsx | import { registerComponent, Components } from 'meteor/vulcan:core';
import React from 'react';
import withErrorBoundary from '../common/withErrorBoundary';
import {AnalyticsContext} from "../../lib/analyticsEvents";
import {useCurrentUser} from "../common/withUser"
const BookmarksPage = () => {
const { SingleColumnS... | import { registerComponent, Components } from 'meteor/vulcan:core';
import React from 'react';
import withErrorBoundary from '../common/withErrorBoundary';
import {AnalyticsContext} from "../../lib/analyticsEvents";
import {useCurrentUser} from "../common/withUser"
const BookmarksPage = () => {
const {SingleColumnSe... | Fix if-else structure and indentation | Fix if-else structure and indentation
| JSX | mit | Discordius/Lesswrong2,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2 | ---
+++
@@ -5,23 +5,18 @@
import {useCurrentUser} from "../common/withUser"
const BookmarksPage = () => {
- const { SingleColumnSection, SectionTitle, BookmarksList} = Components
+ const {SingleColumnSection, SectionTitle, BookmarksList} = Components
const currentUser = useCurrentUser()
- if (currentUse... |
27bdabcfeb7f5cdae0ee5d88b3007d9fb9ee064f | src/views/studio/studio-tab-nav.jsx | src/views/studio/studio-tab-nav.jsx | import React from 'react';
import {useRouteMatch, NavLink} from 'react-router-dom';
import SubNavigation from '../../components/subnavigation/subnavigation.jsx';
const StudioTabNav = () => {
const match = useRouteMatch();
return (
<SubNavigation
align="left"
className="studio-t... | import React from 'react';
import {useRouteMatch, NavLink} from 'react-router-dom';
import SubNavigation from '../../components/subnavigation/subnavigation.jsx';
const StudioTabNav = () => {
const {params: {studioPath, studioId}} = useRouteMatch();
const base = `/${studioPath}/${studioId}`;
return (
... | Fix trailing slash breaking tab navigation | Fix trailing slash breaking tab navigation
| JSX | bsd-3-clause | LLK/scratch-www,LLK/scratch-www | ---
+++
@@ -3,8 +3,8 @@
import SubNavigation from '../../components/subnavigation/subnavigation.jsx';
const StudioTabNav = () => {
- const match = useRouteMatch();
-
+ const {params: {studioPath, studioId}} = useRouteMatch();
+ const base = `/${studioPath}/${studioId}`;
return (
<SubNavigat... |
8537fee1f293d0d2d4da83cd7203ebf86e76f516 | src/components/PostTags/PostTags.jsx | src/components/PostTags/PostTags.jsx | import React, { Component } from 'react';
import Link from 'gatsby-link';
import Chip from 'react-md/lib/Chips';
import './PostTags.scss';
class PostTags extends Component {
render() {
const { tags } = this.props;
return (
<div>
{
tags && tags.map(tag =>
<Link key={tag... | import React, { Component } from 'react';
import _ from 'lodash';
import Link from 'gatsby-link';
import Chip from 'react-md/lib/Chips';
import './PostTags.scss';
class PostTags extends Component {
render() {
const { tags } = this.props;
return (
<div>
{
tags && tags.map(tag =>
... | Tag chips now point to their respective tag pages. | Tag chips now point to their respective tag pages.
| JSX | mit | danielrose28/danielrose28.github.io,Vagr9K/gatsby-material-starter,Vagr9K/gatsby-material-starter | ---
+++
@@ -1,4 +1,5 @@
import React, { Component } from 'react';
+import _ from 'lodash';
import Link from 'gatsby-link';
import Chip from 'react-md/lib/Chips';
import './PostTags.scss';
@@ -9,10 +10,10 @@
return (
<div>
{
- tags && tags.map(tag =>
- <Link key={tag} s... |
6b816f259ce974951668c72bd81322618642e95e | src/js/gi/components/content/AdditionalResources.jsx | src/js/gi/components/content/AdditionalResources.jsx | import React from 'react';
export const AdditionalResourcesLinks = () => (
<div>
<p>
<a href="/education/tools-programs/careerscope" target="_blank">
Get started with CareerScope
</a>
</p>
<p>
<a href="http://www.benefits.va.gov/gibill/choosing_a_school.asp" target="_blank">
... | import React from 'react';
export const AdditionalResourcesLinks = () => (
<div>
<p>
<a href="https://va.careerscope.net/gibill" target="_blank">
Get started with CareerScope
</a>
</p>
<p>
<a href="http://www.benefits.va.gov/gibill/choosing_a_school.asp" target="_blank">
... | Update link to point to va.careerscope | Update link to point to va.careerscope
| JSX | cc0-1.0 | department-of-veterans-affairs/vets-website,department-of-veterans-affairs/vets-website | ---
+++
@@ -3,7 +3,7 @@
export const AdditionalResourcesLinks = () => (
<div>
<p>
- <a href="/education/tools-programs/careerscope" target="_blank">
+ <a href="https://va.careerscope.net/gibill" target="_blank">
Get started with CareerScope
</a>
</p> |
74d32448991e5f70bc0b2255b5febdacfcd61580 | app/components/molecules/HomePageLanguageSelector.jsx | app/components/molecules/HomePageLanguageSelector.jsx | import React from 'react';
import SelectableLanguage from '../atoms/SelectableLanguage';
export default React.createClass({
render() {
return (
<div>
<SelectableLanguage name="English" code="en"/>
<SelectableLanguage name="Magyar" code="hu"/>
<SelectableLanguage name="Español" code... | import React from 'react';
import SelectableLanguage from '../atoms/SelectableLanguage';
export default React.createClass({
render() {
return (
<div>
<SelectableLanguage name="English" code="en"/>{' '}
<SelectableLanguage name="Magyar" code="hu"/>{' '}
<SelectableLanguage name="Esp... | Add spaces between language buttons | Add spaces between language buttons
| JSX | mit | amcsi/szeremi,amcsi/szeremi | ---
+++
@@ -6,9 +6,9 @@
render() {
return (
<div>
- <SelectableLanguage name="English" code="en"/>
- <SelectableLanguage name="Magyar" code="hu"/>
- <SelectableLanguage name="Español" code="es"/>
+ <SelectableLanguage name="English" code="en"/>{' '}
+ <SelectableLangu... |
d064191d821da2c2399bf20c88fba13ea1ddbbc4 | frontend/learning-circle-feedback.jsx | frontend/learning-circle-feedback.jsx | import React from 'react'
import ReactDOM from 'react-dom'
import MeetingFeedback from './components/meeting-feedback'
import LearningCircleFeedbackForm from './components/learning-circle-feedback-form'
import CourseFeedbackForm from './components/course-feedback-form'
import 'components/stylesheets/learning-circle-f... | import React from 'react'
import ReactDOM from 'react-dom'
import MeetingFeedback from './components/meeting-feedback'
import LearningCircleFeedbackForm from './components/learning-circle-feedback-form'
import CourseFeedbackForm from './components/course-feedback-form'
// Replace feedback form for earch meeting
const... | Remove reference to removed stylesheet | Remove reference to removed stylesheet
| JSX | mit | p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles | ---
+++
@@ -4,8 +4,6 @@
import MeetingFeedback from './components/meeting-feedback'
import LearningCircleFeedbackForm from './components/learning-circle-feedback-form'
import CourseFeedbackForm from './components/course-feedback-form'
-
-import 'components/stylesheets/learning-circle-feedback.scss'
// Replace f... |
ca68d005b8b1d39f6c3b15f64f0ce904e1ca2925 | src/index.jsx | src/index.jsx | import '@babel/polyfill';
import {
ConnectedRouter,
connectRouter,
routerMiddleware,
} from 'connected-react-router';
import { createBrowserHistory } from 'history';
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { AppContainer } from 'react-hot-loader'... | import '@babel/polyfill';
import {
ConnectedRouter,
connectRouter,
routerMiddleware,
} from 'connected-react-router';
import { createBrowserHistory } from 'history';
import React from 'react';
import ReactDOM from 'react-dom';
import { AppContainer } from 'react-hot-loader';
import { Provider } from 'react-redux'... | Remove disabling of ESLint rule and fix import | Remove disabling of ESLint rule and fix import
| JSX | mit | laschuet/react-starter-kit,laschuet/react-starter-kit | ---
+++
@@ -7,17 +7,15 @@
import { createBrowserHistory } from 'history';
import React from 'react';
import ReactDOM from 'react-dom';
+import { AppContainer } from 'react-hot-loader';
import { Provider } from 'react-redux';
-import { AppContainer } from 'react-hot-loader';
import { applyMiddleware, compose, cre... |
1da2a6da83abd0c3233e7d94750bc0f479141ae0 | client/fragments/fragment.jsx | client/fragments/fragment.jsx | import { PropTypes } from 'react';
import { Link } from 'react-router';
import GithubFragment from './github_fragment';
const Fragment = ({ routeName, text, github, url }) => {
if (routeName) {
return <Link to={routeName}>{text}</Link>;
} else if (github) {
return <GithubFragment github={github} />;
} el... | import { PropTypes } from 'react';
import { Link } from 'react-router';
import GithubFragment from './github_fragment';
const Fragment = ({ routeName, text, github, url }) => {
if (routeName) {
return <Link to={routeName}>{text}</Link>;
} else if (github) {
return <GithubFragment github={github} />;
} el... | Make outside links open new tab | Make outside links open new tab
| JSX | mit | golmansax/my-site-in-express,golmansax/my-site-in-express | ---
+++
@@ -8,7 +8,11 @@
} else if (github) {
return <GithubFragment github={github} />;
} else if (url) {
- return <a href={url}>{text || url}</a>;
+ return (
+ <a href={url} target={url.match(/https?:/) ? '_blank': null}>
+ {text || url}
+ </a>
+ );
}
return <span>{text}... |
5035a6a616b38bffc8bcea57801b5412c61e0001 | client/components/team/team-members.jsx | client/components/team/team-members.jsx | import { Meteor } from 'meteor/meteor';
import React, { Component } from 'react';
import { createContainer } from 'meteor/react-meteor-data';
import { Card, Icon } from 'semantic-ui-react';
TeamMembers = class TeamMembers extends Component {
constructor(props) {
super(props);
}
render() {
if (this.props... | import { Meteor } from 'meteor/meteor';
import React, { Component } from 'react';
import { createContainer } from 'meteor/react-meteor-data';
import { Card, Icon, Button } from 'semantic-ui-react';
TeamMembers = class TeamMembers extends Component {
constructor(props) {
super(props);
}
render() {
if (th... | Fix bug getting email address | Fix bug getting email address
| JSX | mit | kyle-rader/greatpuzzlehunt,kyle-rader/greatpuzzlehunt,kyle-rader/greatpuzzlehunt | ---
+++
@@ -1,7 +1,7 @@
import { Meteor } from 'meteor/meteor';
import React, { Component } from 'react';
import { createContainer } from 'meteor/react-meteor-data';
-import { Card, Icon } from 'semantic-ui-react';
+import { Card, Icon, Button } from 'semantic-ui-react';
TeamMembers = class TeamMembers extends ... |
a207d26bd9e30d110febc373abdc91882ca08a25 | imports/ui/dimension-view/element-tree/toggle-button.jsx | imports/ui/dimension-view/element-tree/toggle-button.jsx | import React, { PropTypes } from 'react';
const TreeToggler = (props) => {
if (props.childIds.length === 0) {
return null;
}
const togglerClasses = () => {
if (props.childrenVisible) {
return 'glyphicon glyphicon-chevron-down';
}
return 'glyphicon glyphicon-chevron-right';
};
return (... | import React, { PropTypes } from 'react';
const TreeToggler = (props) => {
if (props.childIds.length === 0) {
return null;
}
const togglerClasses = () => {
if (props.childrenVisible) {
return 'glyphicon glyphicon-chevron-down';
}
return 'glyphicon glyphicon-chevron-right';
};
return (... | Make tree toggle cursor a pointer | Make tree toggle cursor a pointer
| JSX | mit | minden/data-furnace,minden/data-furnace | ---
+++
@@ -16,7 +16,7 @@
<span
className={togglerClasses()}
onClick={props.toggleChildrenVisible}
- style={{ paddingRight: '10px' }}
+ style={{ paddingRight: '10px', cursor: 'pointer' }}
></span>
);
}; |
24e9a68d621fd2a57a29b3b80e4b54ecb22fa593 | website/src/components/Supporters.jsx | website/src/components/Supporters.jsx | import React from 'react';
import PropTypes from 'prop-types';
const BACKER_COUNT = 30;
const SPONSOR_COUNT = 30;
function Supporters({ type }) {
const COUNT = type === 'backer' ? BACKER_COUNT : SPONSOR_COUNT;
if (type !== 'backer' && type !== 'sponsor') {
throw new Error('Invalid supporter type');
}
co... | import React from 'react'
import PropTypes from 'prop-types'
const BACKER_COUNT = 30
const SPONSOR_COUNT = 30
function Supporters({ type }) {
const COUNT = type === 'backer' ? BACKER_COUNT : SPONSOR_COUNT
if (type !== 'backer' && type !== 'sponsor') {
throw new Error('Invalid supporter type')
}
const su... | Fix rendering backers & sponsors on the site | Fix rendering backers & sponsors on the site
| JSX | mit | redux-saga/redux-saga,redux-saga/redux-saga,yelouafi/redux-saga,yelouafi/redux-saga | ---
+++
@@ -1,32 +1,34 @@
-import React from 'react';
-import PropTypes from 'prop-types';
+import React from 'react'
+import PropTypes from 'prop-types'
-const BACKER_COUNT = 30;
-const SPONSOR_COUNT = 30;
+const BACKER_COUNT = 30
+const SPONSOR_COUNT = 30
function Supporters({ type }) {
- const COUNT = type =... |
3a0a57689515457046904af4b35326e6175c1512 | docs/src/Examples/Demo/TimePickerBasic.jsx | docs/src/Examples/Demo/TimePickerBasic.jsx | import React, { Fragment, PureComponent } from 'react';
import { TimePicker } from 'material-ui-pickers';
export default class BasicUsage extends PureComponent {
state = {
selectedDate: new Date(),
}
handleDateChange = (date) => {
this.setState({ selectedDate: date });
}
render() {
const { sele... | import React, { Fragment, PureComponent } from 'react';
import { TimePicker } from 'material-ui-pickers';
export default class BasicUsage extends PureComponent {
state = {
selectedDate: new Date(),
}
handleDateChange = (date) => {
this.setState({ selectedDate: date });
}
render() {
const { sele... | Add TimePicker with seconds example in basic usage. | Add TimePicker with seconds example in basic usage.
| JSX | mit | callemall/material-ui,rscnt/material-ui,rscnt/material-ui,mui-org/material-ui,oliviertassinari/material-ui,callemall/material-ui,oliviertassinari/material-ui,callemall/material-ui,oliviertassinari/material-ui,mbrookes/material-ui,mui-org/material-ui,mui-org/material-ui,mbrookes/material-ui,rscnt/material-ui,callemall/m... | ---
+++
@@ -42,6 +42,29 @@
onChange={this.handleDateChange}
/>
</div>
+
+ <div className="picker">
+ <TimePicker
+ seconds
+ format="HH:mm:ss A"
+ todayLabel="now"
+ label="With seconds"
+ value={selectedDate}
+ ... |
f23ebde7d38306cd2994c01c198d62fd9670bf35 | web/static/js/configs/stage_configs.jsx | web/static/js/configs/stage_configs.jsx | import React from "react"
export default {
"prime-directive": {
alert: null,
confirmationMessage: "Has your entire party arrived?",
nextStage: "idea-generation",
progressionButton: {
copy: "Proceed to Idea Generation",
iconClass: "arrow right",
},
},
"idea-generation": {
alert... | import React from "react"
export default {
"prime-directive": {
alert: null,
confirmationMessage: "Has your entire party arrived?",
nextStage: "idea-generation",
progressionButton: {
copy: "Proceed to Idea Generation",
iconClass: "arrow right",
},
},
"idea-generation": {
alert... | Update CTA for filling out feedback survey post-retro | Update CTA for filling out feedback survey post-retro
| JSX | mit | tnewell5/remote_retro,samdec11/remote_retro,stride-nyc/remote_retro,stride-nyc/remote_retro,stride-nyc/remote_retro,tnewell5/remote_retro | ---
+++
@@ -34,8 +34,7 @@
bodyText: <div>
<p>The facilitator has distributed this retro's action items.
You will receive an email breakdown shortly!</p>
- <p>Thank you for using Remote Retro!
- Please click <a href="https://www.surveymonkey.com/r/JKT9FXM" target="_blank" rel... |
6923af6afb010a9008ba6574176a2c49c4684f5e | client/components/listingInfo.jsx | client/components/listingInfo.jsx |
const ListingInfo = props => (
<div className='listing-info'>
<div className="listing-info-date"> {props.listing.createdAt} | </div>
<div className="listing-info-title"> {props.listing.title} </div>
<div className="listing-info-location"> {props.listing.location} | </div>
<div className="listing-info... | //Detailed Listing Info component - shows when user clicks a specific ListingEntry
const ListingInfo = props => (
<div className='listing-info'>
<div className="listing-info-date"> {props.listing.createdAt} | </div>
<div className="listing-info-title"> {props.listing.title} </div>
<div className="listing-... | Add annotations to ListingInfo componenent | Add annotations to ListingInfo componenent
| JSX | mit | Hackifieds/hackifieds,glistening-gibus/hackifieds,Hackifieds/hackifieds,glistening-gibus/hackifieds,glistening-gibus/hackifieds | ---
+++
@@ -1,4 +1,4 @@
-
+//Detailed Listing Info component - shows when user clicks a specific ListingEntry
const ListingInfo = props => (
<div className='listing-info'>
<div className="listing-info-date"> {props.listing.createdAt} | </div> |
4fcef383e5598f7695a7757865538216efd33edc | ui/component/cardMedia/view.jsx | ui/component/cardMedia/view.jsx | // @flow
import React from 'react';
import FreezeframeWrapper from './FreezeframeWrapper';
import Placeholder from './placeholder.png';
type Props = {
thumbnail: ?string, // externally sourced image
};
const className = 'media__thumb';
class CardMedia extends React.PureComponent<Props> {
render() {
const { t... | // @flow
import React from 'react';
import FreezeframeWrapper from './FreezeframeWrapper';
import Placeholder from './placeholder.png';
type Props = {
thumbnail: ?string, // externally sourced image
};
const className = 'media__thumb';
class CardMedia extends React.PureComponent<Props> {
render() {
const { t... | Revert hot fix since it's working again | Revert hot fix since it's working again | JSX | mit | lbryio/lbry-app,lbryio/lbry-app,lbryio/lbry-electron,lbryio/lbry-electron,lbryio/lbry-electron | ---
+++
@@ -20,12 +20,11 @@
let url;
// @if TARGET='web'
// Pass image urls through a compression proxy
- url = thumbnail || Placeholder;
-// url = thumbnail
-// ? 'https://ext.thumbnails.lbry.com/400x,q55/' +
-// // The image server will redirect if we don't remove the double ... |
42f7f3f64afff158083bebb37312057b01caaaa0 | src/components/NavBar/index.jsx | src/components/NavBar/index.jsx | import React from 'react';
import styles from './index.scss';
import { Link } from 'react-router';
import { actions as currentUserActions } from 'redux/modules/currentUser';
import { connect } from 'react-redux';
const mapStateToProps = (state) => ({
currentUser: state.currentUser,
});
export default class NavBar e... | import React from 'react';
import styles from './index.scss';
import { Link } from 'react-router';
import { actions as currentUserActions } from 'redux/modules/currentUser';
import { connect } from 'react-redux';
const mapStateToProps = (state) => ({
currentUser: state.currentUser,
});
export default class NavBar e... | Add log out link to <NavBar> | Add log out link to <NavBar>
This will eventually go in a menu probably, but for now, we need a way
to log out.
| JSX | mit | lencioni/gift-thing,lencioni/gift-thing | ---
+++
@@ -26,7 +26,10 @@
<div>
{currentUser &&
- currentUser.name
+ <div>
+ {currentUser.name}{' '}
+ <a href="/auth/logout">Log out</a>
+ </div>
}
{!currentUser &&
<Link to="/auth/login/facebook">Log... |
9b7a52d27f739b3d6339536b9ad7adba3ef09399 | kanban_app/app/components/App.jsx | kanban_app/app/components/App.jsx | import uuid from 'node-uuid';
import React from 'react';
import {reactiveComponent} from 'mobservable';
import Notes from './Notes.jsx';
class App extends React.Component {
constructor(props) {
super(props);
const store = props.store;
this.addNote = store.addNote.bind(store, {task: 'New task'});
th... | import uuid from 'node-uuid';
import React from 'react';
import {reactiveComponent} from 'mobservable';
import Notes from './Notes.jsx';
@reactiveComponent
export default class App extends React.Component {
constructor(props) {
super(props);
const store = props.store;
this.addNote = store.addNote.bind(... | Use decorator form of `reactiveComponent` | Use decorator form of `reactiveComponent`
A little neater this way.
| JSX | mit | dschalk/mobservable-demo,mweststrate/mobservable-demo,survivejs/mobservable-demo | ---
+++
@@ -3,7 +3,8 @@
import {reactiveComponent} from 'mobservable';
import Notes from './Notes.jsx';
-class App extends React.Component {
+@reactiveComponent
+export default class App extends React.Component {
constructor(props) {
super(props);
@@ -27,6 +28,4 @@
</div>
);
}
-}
-
-expor... |
7511aa24cd237a5e9b78d8b24e1ef40418aa4d49 | client/apps/admin/components/common/delete_modal.spec.jsx | client/apps/admin/components/common/delete_modal.spec.jsx | import React from 'react';
import { mount } from 'enzyme';
import DeleteModal from './delete_modal';
describe('delete modal', () => {
let result;
let clicked;
let props;
beforeEach(() => {
clicked = false;
props = {
isOpen: true,
closeModal: () => { clicked = true; },
deleteRecord: (... | import React from 'react';
import ReactDOM from 'react-dom';
import TestRenderer from 'react-test-renderer';
import DeleteModal from './delete_modal';
describe('delete modal', () => {
let result;
let instance;
let clicked;
let props;
// https://medium.com/@amanverma.dev/mocking-create-portal-to-utilize-reac... | Update react. Remove calls to 'mount' from enzyme | Update react. Remove calls to 'mount' from enzyme
| JSX | mit | atomicjolt/lti_starter_app,atomicjolt/lti_starter_app,atomicjolt/lti_starter_app,atomicjolt/lti_starter_app | ---
+++
@@ -1,11 +1,22 @@
import React from 'react';
-import { mount } from 'enzyme';
+import ReactDOM from 'react-dom';
+import TestRenderer from 'react-test-renderer';
import DeleteModal from './delete_modal';
describe('delete modal', () => {
let result;
+ let instance;
let clicked;
let props;
+
+ /... |
4d3387c192b6d117893187a941fd4ece577bd416 | imports/ui/components/globalNavigation.jsx | imports/ui/components/globalNavigation.jsx | import { Meteor } from 'meteor/meteor';
import React from 'react';
import { PropTypes } from 'prop-types';
import { Link } from 'react-router-dom';
import Navbar from 'react-bootstrap/lib/Navbar';
import container from '/imports/lib/container';
import PublicNavigation from './publicNavigation';
import AuthenticatedNav... | import React from 'react';
import { PropTypes } from 'prop-types';
import { Link } from 'react-router-dom';
import Navbar from 'react-bootstrap/lib/Navbar';
import PublicNavigation from './publicNavigation';
import AuthenticatedNavigation from './authenticatedNavigation';
const GlobalNavigation = props => (
<Navbar... | Update UI GlobalNavigation with authenticated props | Update UI GlobalNavigation with authenticated props
| JSX | mit | ggallon/rock,ggallon/rock | ---
+++
@@ -1,16 +1,12 @@
-import { Meteor } from 'meteor/meteor';
import React from 'react';
import { PropTypes } from 'prop-types';
import { Link } from 'react-router-dom';
import Navbar from 'react-bootstrap/lib/Navbar';
-import container from '/imports/lib/container';
import PublicNavigation from './public... |
560b963d74368b14c53ff5390cac4733236c0ea7 | components/data-table/highlight-cell.jsx | components/data-table/highlight-cell.jsx | /* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */
/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
// ### React
import React from 'react';
import PropTypes from 'prop-types';
// ## Children
import DataTableCell from './cell';
import Highlighter from '../utilities/hig... | /* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */
/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
// ### React
import React from 'react';
import PropTypes from 'prop-types';
// ## Children
import DataTableCell from './cell';
import Highlighter from '../utilities/hig... | Make highlight cell have the same prop types for the children as DataTableCell | Make highlight cell have the same prop types for the children as DataTableCell
| JSX | bsd-3-clause | salesforce/design-system-react,salesforce/design-system-react,salesforce/design-system-react | ---
+++
@@ -30,11 +30,7 @@
/**
* The contents of the cell. Equivalent to `props.item[props.property]`
*/
- children: PropTypes.oneOfType([
- PropTypes.string,
- PropTypes.number,
- PropTypes.bool,
- ]),
+ children: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
/**
* The string of text (or R... |
a38e6cd5001a42515ac41a80270fa1a9b50c3637 | app/javascript/app/layouts/contained/contained-component.jsx | app/javascript/app/layouts/contained/contained-component.jsx | import React, { PureComponent } from 'react';
import Proptypes from 'prop-types';
import { renderRoutes } from 'react-router-config';
import CountriesProvider from 'providers/countries-provider';
import { HOME_PAGE } from 'data/SEO';
import { MetaDescription, SocialMetadata } from 'components/seo';
import Footer from ... | import React, { PureComponent } from 'react';
import Proptypes from 'prop-types';
import { renderRoutes } from 'react-router-config';
import CountriesProvider from 'providers/countries-provider';
import { HOME_PAGE } from 'data/SEO';
import { MetaDescription, SocialMetadata } from 'components/seo';
import Footer from ... | Add isContained prop on contained component | Add isContained prop on contained component
| JSX | mit | Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch | ---
+++
@@ -15,7 +15,7 @@
<MetaDescription descriptionContext={HOME_PAGE} />
<SocialMetadata descriptionContext={HOME_PAGE} href={location.href} />
<CountriesProvider />
- {renderRoutes(route.routes.filter(r => r.path))}
+ {renderRoutes(route.routes.filter(r => r.path), { isCo... |
5675837699da1c72e7a1f26f963db1232add43fd | app/mainRoutes.jsx | app/mainRoutes.jsx | var React = require("react");
var Router = require("react-router");
var Route = Router.Route;
var DefaultRoute = Router.DefaultRoute;
// polyfill
if(!Object.assign)
Object.assign = React.__spread;
// export routes
module.exports = (
<Route name="app" path="/" handler={require("./Application")}>
<Route name="some-... | var React = require("react");
var Router = require("react-router");
var Route = Router.Route;
var DefaultRoute = Router.DefaultRoute;
// polyfill
if(!Object.assign)
Object.assign = React.__spread;
// export routes
module.exports = (
<Route name="app" path="/" handler={require("./Application")}>
<Route name="some-... | Fix home route: was handled as todo list. | Fix home route: was handled as todo list.
| JSX | mit | Paqmind/starter,Paqmind/starter,Paqmind/starter | ---
+++
@@ -12,8 +12,8 @@
<Route name="app" path="/" handler={require("./Application")}>
<Route name="some-page" path="/some-page" handler={require("react-proxy!./SomePage")} />
<Route name="readme" path="/readme" handler={require("react-proxy!./Readme")} />
- <Route name="todolist" path="/:list" handler={re... |
cede5a1702414fd850534d860593071080f13823 | app/CircuitDiagram.jsx | app/CircuitDiagram.jsx | /* @flow */
'use strict';
import React from 'react';
import ReactArt from 'react-art';
import Circle from 'react-art/lib/Circle.art'
var Surface = ReactArt.Surface;
export default class CircuitDiagram extends React.Component {
/**
* [constructor description]
* @param {object} props
* @param {number} pr... | /* @flow */
'use strict';
import React from 'react';
import ReactArt from 'react-art';
import Circle from 'react-art/lib/Circle.art'
var Surface = ReactArt.Surface;
export default class CircuitDiagram extends React.Component {
/**
* [constructor description]
* @param {object} props
* @param {number} pr... | Test out onClick on element | Test out onClick on element
Works great, onClick only fires when clicking inside the circle!
| JSX | epl-1.0 | circuitsim/circuit-simulator,circuitsim/circuit-simulator,circuitsim/circuit-simulator | ---
+++
@@ -19,6 +19,12 @@
*/
constructor(props) {
super(props);
+ this.state = {radius: 10};
+ this.onClick = this.onClick.bind(this);
+ }
+
+ onClick() {
+ this.setState({radius: this.state.radius +=5});
}
render() {
@@ -28,7 +34,8 @@
height={this.props.height}
style... |
663b547139cd48b231e8af55ef5ed5f1ec58a5f2 | src/components/App.jsx | src/components/App.jsx | /*
Главный компонент приложения
*/
import React from "react";
import MenuScreen from "./MenuScreen/MenuScreen.js";
import GameScreen from "./GameScreen/GameScreen.js";
import { connect } from "react-redux";
import {MENU_SCREEN, GAME_SCREEN} from "../actions/ScreenActions.js";
const App = React.createClass({
... | /*
Главный компонент приложения
*/
import React from "react";
import MenuScreen from "./MenuScreen/MenuScreen.js";
import GameScreen from "./GameScreen/GameScreen.js";
import { connect } from "react-redux";
import {MENU_SCREEN, GAME_SCREEN} from "../actions/ScreenActions.js";
const App = React.createClass({
... | Add dispatch methods to props of Menu and Game Screens | Add dispatch methods to props of Menu and Game Screens
| JSX | mit | Lingvokot/Tic-Tac-Toe-React,Lingvokot/Tic-Tac-Toe-React,Lingvokot/Tic-Tac-Toe-React | ---
+++
@@ -11,23 +11,20 @@
PropTypes: {
currentScreen: React.PropTypes.string,
gameGrid: React.PropTypes.array,
- victoryStatistics: React.PropTypes.object,
- buttonClickHandler: React.PropTypes.func.isRequired,
- cellClickHandler: React.PropTypes.func.isRequired
+ victoryStatistics: React.P... |
8359fa5b90f328456560be8a44af765b7f9c9932 | src/app/components/App.jsx | src/app/components/App.jsx | import React from 'react';
export default class AppComponent extends React.Component {
render() {
return (
<div id="container-app-layout">
App
</div>
);
}
} | import React from 'react';
import React3 from 'react-three-renderer';
import THREE from 'three';
export default class AppComponent extends React.Component {
componentDidMount() {
this._createDefaultEnvironment();
}
/**
* Create default 3D environment (grid, skybox, ...)
* @private
... | Create default R3R scene with grid helper | Create default R3R scene with grid helper
| JSX | apache-2.0 | Colmea/facebook-webvr,Colmea/facebook-webvr | ---
+++
@@ -1,12 +1,65 @@
import React from 'react';
+import React3 from 'react-three-renderer';
+import THREE from 'three';
export default class AppComponent extends React.Component {
+ componentDidMount() {
+ this._createDefaultEnvironment();
+ }
+
+ /**
+ * Create default 3D environment (... |
8254a70708b02f0167754c0903074bbabb1e29f1 | src/components/post-likes.jsx | src/components/post-likes.jsx | import React from 'react';
import { preventDefault } from '../utils';
import UserName from './user-name';
const renderLike = (item, i, items) => (
<li key={item.id} className="post-like">
{item.id !== 'more-likes' ? (
<UserName user={item} />
) : (
<a className="more-post-likes-link" onClick={p... | import React from 'react';
import { preventDefault } from '../utils';
import UserName from './user-name';
import { Icon } from './fontawesome-icons';
const renderLike = (item, i, items) => (
<li key={item.id} className="post-like">
{item.id !== 'more-likes' ? (
<UserName user={item} />
) : (
<a... | Update the post like icon | Update the post like icon
| JSX | mit | FreeFeed/freefeed-react-client,kadmil/freefeed-react-client,davidmz/freefeed-react-client,FreeFeed/freefeed-react-client,kadmil/freefeed-react-client,kadmil/freefeed-react-client,FreeFeed/freefeed-react-client,davidmz/freefeed-react-client,davidmz/freefeed-react-client | ---
+++
@@ -2,6 +2,7 @@
import { preventDefault } from '../utils';
import UserName from './user-name';
+import { Icon } from './fontawesome-icons';
const renderLike = (item, i, items) => (
@@ -42,7 +43,7 @@
return (
<div className="post-likes">
- <i className="fa fa-heart icon" />
+ <Icon... |
6fe0f8cf79b4f5017e1ca944a6e340cfcb49e034 | app/frontend/views/purpose/route.js.jsx | app/frontend/views/purpose/route.js.jsx | //= require ./label
//= require views/purchase/grid
//= require flux/purpose/store
App.Purpose.Route = (function () {
'use strict';
return React.createClass({
mixins: [
React.addons.PureRenderMixin,
React.BindMixin(App.Purpose.Store, 'getStateFromStore')
],
propTypes: {
id: PropType... | //= require ./label
//= require views/purchase/table
//= require flux/purpose/store
//= require flux/purchase/store
App.Purpose.Route = (function () {
'use strict';
return React.createClass({
mixins: [
React.addons.PureRenderMixin,
React.BindMixin(App.Purpose.Store, 'getStateFromStore')
],
... | Use table in purpose route | Use table in purpose route
| JSX | mit | golmansax/my-gear,golmansax/my-gear,golmansax/my-gear | ---
+++
@@ -1,6 +1,7 @@
//= require ./label
-//= require views/purchase/grid
+//= require views/purchase/table
//= require flux/purpose/store
+//= require flux/purchase/store
App.Purpose.Route = (function () {
'use strict';
@@ -22,13 +23,19 @@
},
render: function () {
+ var purchases = Immuta... |
717a38ae0ae8cd11bad825118ca956cba0228f47 | client/components/MultiSelectQuestion.jsx | client/components/MultiSelectQuestion.jsx | import React, { Component } from 'react'
import MultiSelect from './multiSelect'
class MultiSelectQuestion extends Component {
handleChange(value) {
this.props.action(value);
}
render() {
const {label, options} = this.props;
return (
<div>
<label style={{display: 'block'}}>{label}</lab... | import React, { Component } from 'react'
import MultiSelect from './multiSelect'
class MultiSelectQuestion extends Component {
handleChange(value) {
this.props.action(value);
}
render() {
const {label, options} = this.props;
return (
<div>
<h3>{label}</h3>
<MultiSelect onChange... | Revert "add some inline style;extract it out later" | Revert "add some inline style;extract it out later"
This reverts commit 7a1549a20dc2fe76f98f66682f6f419384ea7b45.
| JSX | mit | jchappypig/tickets-app-react-redux-node,jchappypig/tickets-app-react-redux-node | ---
+++
@@ -10,7 +10,7 @@
const {label, options} = this.props;
return (
<div>
- <label style={{display: 'block'}}>{label}</label>
+ <h3>{label}</h3>
<MultiSelect onChange={this.handleChange.bind(this)} options={options}/>
</div>
) |
0142892588d649f039e68a909f25ebf5c3d24b55 | src/components/PageCard/Heading/index.jsx | src/components/PageCard/Heading/index.jsx | import styles from './style.postcss';
import React from 'react';
import pure from 'recompose/pure';
import classnames from 'classnames';
import is from 'is_js';
import PropTypes from 'prop-types';
const PageCardHeading = (props) => {
const { className, text } = props;
return <header className={classnames(styles.... | import styles from './style.postcss';
import React from 'react';
import pure from 'recompose/pure';
import classnames from 'classnames';
import is from 'is_js';
import PropTypes from 'prop-types';
const PageCardHeading = (props) => {
const { className, titleClassName, text } = props;
return <header className={cl... | Add titleClassName for page card title. | feat(PageCard): Add titleClassName for page card title.
| JSX | mit | e1-bsd/omni-common-ui,e1-bsd/omni-common-ui | ---
+++
@@ -7,13 +7,13 @@
import PropTypes from 'prop-types';
const PageCardHeading = (props) => {
- const { className, text } = props;
+ const { className, titleClassName, text } = props;
return <header className={classnames(styles.PageCardHeading, className, {
[styles.__stackHorizontal]: props.stack... |
5c46c6040aa723e802235c634f12121ff0acc06e | packages/lesswrong/server/emailComponents/PrivateMessagesEmail.jsx | packages/lesswrong/server/emailComponents/PrivateMessagesEmail.jsx | import React from 'react';
import { registerComponent, Components } from 'meteor/vulcan:core';
import { withStyles } from '@material-ui/core/styles';
import './EmailUsername.jsx';
const styles = theme => ({
message: {
},
});
const PrivateMessagesEmail = ({conversation, messages, participantsById, classes}) => {
... | import React from 'react';
import { getSetting, registerComponent, Components } from 'meteor/vulcan:core';
import { withStyles } from '@material-ui/core/styles';
import './EmailUsername.jsx';
import './EmailFormatDate.jsx';
const styles = theme => ({
message: {
},
});
const PrivateMessagesEmail = ({conversation, ... | Add timestamps to PM email | Add timestamps to PM email
| JSX | mit | Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Telescope | ---
+++
@@ -1,7 +1,8 @@
import React from 'react';
-import { registerComponent, Components } from 'meteor/vulcan:core';
+import { getSetting, registerComponent, Components } from 'meteor/vulcan:core';
import { withStyles } from '@material-ui/core/styles';
import './EmailUsername.jsx';
+import './EmailFormatDate.js... |
a86242cf4292c8d50b3910f5dd87fcb91da18182 | src/routes/Home/FirstTimeRun/components/DownloadView.jsx | src/routes/Home/FirstTimeRun/components/DownloadView.jsx | import React, { Component } from 'react';
import InstallatorsView from './InstallatorsView';
class DownloadView extends Component {
render() {
return (
<section id='typography'>
<div className='page-header'>
<h1>Descarga aplicación</h1>
</div>
<div className='row'>
... | import React, { Component } from 'react';
import InstallatorsView from './InstallatorsView';
class DownloadView extends Component {
render() {
return (
<section id='typography'>
<div className='page-header'>
<h1>Descarga aplicación</h1>
</div>
<div className='row'>
... | Add link to web client. | Add link to web client.
| JSX | mit | TiX-measurements/tix-web,TiX-measurements/tix-web | ---
+++
@@ -23,6 +23,12 @@
</ul>
</div>
</div>
+ <div className='row'>
+ <div className='span12'>
+ <h4>Cliente web</h4>
+ <p>También puede descargarse y compilar el cliente Java desde <a href="https://github.com/TiX-measurements/tix-time-client">... |
395e258d18fa000b74c1af33e0dfcb21fdfd2375 | src/components/search-box.jsx | src/components/search-box.jsx | import React, {PropTypes} from "react"
const SearchBox = React.createClass({
propTypes: {
query: PropTypes.string,
onQueryChange: PropTypes.func,
},
onInputChange(event) {
this.props.onQueryChange(event.target.value)
},
render() {
return (
<div className="panel panel-default">
... | import React, {PropTypes} from "react"
const SearchBox = React.createClass({
propTypes: {
query: PropTypes.string,
onQueryChange: PropTypes.func,
},
handleSubmit(event) {
event.preventDefault();
this.props.onQueryChange(this.input.value)
},
render() {
return (
<div className="panel... | Use a search button to reduce computations on each char typed | Use a search button to reduce computations on each char typed
| JSX | agpl-3.0 | openfisca/legislation-explorer | ---
+++
@@ -6,8 +6,9 @@
query: PropTypes.string,
onQueryChange: PropTypes.func,
},
- onInputChange(event) {
- this.props.onQueryChange(event.target.value)
+ handleSubmit(event) {
+ event.preventDefault();
+ this.props.onQueryChange(this.input.value)
},
render() {
return (
@@ -16,18 ... |
36ae6fd11aefa68cc66487e71135bc92ec17cff7 | src/components/pages/not-found-page.jsx | src/components/pages/not-found-page.jsx | /*
OpenFisca -- A versatile microsimulation software
By: OpenFisca Team <contact@openfisca.fr>
Copyright (C) 2011, 2012, 2013, 2014, 2015 OpenFisca Team
https://github.com/openfisca
This file is part of OpenFisca.
OpenFisca is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero ... | /*
OpenFisca -- A versatile microsimulation software
By: OpenFisca Team <contact@openfisca.fr>
Copyright (C) 2011, 2012, 2013, 2014, 2015 OpenFisca Team
https://github.com/openfisca
This file is part of OpenFisca.
OpenFisca is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero ... | Enhance not found page title | Enhance not found page title
| JSX | agpl-3.0 | openfisca/legislation-explorer | ---
+++
@@ -30,7 +30,7 @@
var NotFoundPage = React.createClass({
render() {
return (
- <DocumentTitle title="Page non trouvée">
+ <DocumentTitle title="Page non trouvée - Explorateur de la légisation">
<h1>Page non trouvée</h1>
</DocumentTitle>
); |
a1656463887df15bf1649cfcaa04153309810ce2 | app/views/Home/Login/Login.jsx | app/views/Home/Login/Login.jsx | /* Login dialog react component */
import React from 'react';
import Dialog from 'material-ui/Dialog';
import FlatButton from 'material-ui/FlatButton';
import RaisedButton from 'material-ui/RaisedButton';
export default class Login extends React.Component {
constructor() {
super();
this.state = {
... | /* Login dialog react component */
import React from 'react';
import Dialog from 'material-ui/Dialog';
import FlatButton from 'material-ui/FlatButton';
import RaisedButton from 'material-ui/RaisedButton';
export default class Login extends React.Component {
constructor() {
super();
this.state = {
... | Fix bug with closing dialog box | Fix bug with closing dialog box
| JSX | mit | AlbertoALopez/polling,AlbertoALopez/polling | ---
+++
@@ -51,7 +51,7 @@
actions={actions}
modal={false}
open={this.state.open}
- onRequestClose={this.handleClose}
+ onRequestClose={this.handleClose.bind(this)}
>
Login to crea... |
0ef810cc96f066ef06ce88a764343f014cdcd565 | app/assets/javascripts/components/_rugby_dict_query.js.jsx | app/assets/javascripts/components/_rugby_dict_query.js.jsx | var RugbyDictQuery = React.createClass({
getInitialState() {
return {
translationInput: "",
translationResult: ""
};
},
handleTranslate() {
$.getJSON('/api/v1/dict.json', {entry: this.state.translationInput}, (response) => {
this.setState({ translationResult: response.result })
... | var RugbyDictQuery = React.createClass({
getInitialState() {
return {
translationInput: "",
translationResult: ""
};
},
handleTranslate() {
$.getJSON('/api/v1/dict.json', {entry: this.state.translationInput}, (response) => {
this.setState({ translationResult: response.result.join(' ... | Add space bewteen results of rugby dict | Add space bewteen results of rugby dict
| JSX | mit | crispgm/rugby-board,crispgm/rugby-board,crispgm/rugby-board | ---
+++
@@ -7,7 +7,7 @@
},
handleTranslate() {
$.getJSON('/api/v1/dict.json', {entry: this.state.translationInput}, (response) => {
- this.setState({ translationResult: response.result })
+ this.setState({ translationResult: response.result.join(' ') })
});
},
handleChange(event) { |
80581377788808011114252e7d62df8deb7c8af5 | client/components/game/company-name/tests/company-name.jsx | client/components/game/company-name/tests/company-name.jsx | import React from 'react';
import {expect} from 'chai';
import {render} from 'enzyme';
const {describe, it} = global;
import { default as CompanyName } from '../company-name.jsx';
describe('Company has a name', () => {
const companyName = [ {
name: 'Best Company'
}, {
name: 'Worst Company'
} ];
it( '... | import React from 'react';
import {expect} from 'chai';
import {render} from 'enzyme';
const {describe, it} = global;
import { default as CompanyName } from '../company-name.jsx';
describe('Company has a name', () => {
const companyName = [ {
name: 'Best Company'
}, {
name: 'Worst Company'
} ];
it( '... | Fix tests... are you even running these? | Fix tests... are you even running these?
| JSX | mit | gios-asu/sustainability-game,gios-asu/dont-get-fired-game,gios-asu/dont-get-fired-game,gios-asu/sustainability-game | ---
+++
@@ -13,8 +13,10 @@
} ];
it( 'has name', () => {
- const wrapper = render(<CompanyName companyName={companyName} />);
+ let wrapper = render(<CompanyName companyName={companyName[0].name} />);
expect(wrapper.text()).to.contain('Best Company');
+
+ wrapper = render(<CompanyName companyName... |
0520d73d0ebff9bd148f0483067a55f44e05b562 | ui/js/component/Tooltip.jsx | ui/js/component/Tooltip.jsx | 'use strict';
var _ = require('lodash');
var React = require('react');
// Imports
var Tooltip = React.createClass({
propTypes : {
top : React.PropTypes.number.isRequired,
left : React.PropTypes.number.isRequired
},
render : function () {
return (
<div className='tooltip' style={this.props}>... | 'use strict';
var _ = require('lodash');
var React = require('react');
var dom = require('util/dom');
var Tooltip = React.createClass({
propTypes : {
top : React.PropTypes.number.isRequired,
left : React.PropTypes.number.isRequired
},
getInitialState : function () {
return {
align : 'left'... | Change orientation of tooltip so it doesn't clip | Change orientation of tooltip so it doesn't clip
| JSX | agpl-3.0 | SeedScientific/polio,SeedScientific/polio,unicef/rhizome,unicef/rhizome,SeedScientific/polio,unicef/polio,unicef/polio,unicef/rhizome,unicef/rhizome,SeedScientific/polio,unicef/polio,SeedScientific/polio,unicef/polio | ---
+++
@@ -3,7 +3,7 @@
var _ = require('lodash');
var React = require('react');
-// Imports
+var dom = require('util/dom');
var Tooltip = React.createClass({
propTypes : {
@@ -11,13 +11,61 @@
left : React.PropTypes.number.isRequired
},
+ getInitialState : function () {
+ return {
+ align... |
61008c654aee0c2ab06a55066af1ae41bfcd88e1 | ui/js/profile/CongressionalDistrict.jsx | ui/js/profile/CongressionalDistrict.jsx | import React, { PropTypes } from 'react';
import { connect } from 'react-redux';
import { Button } from 'react-bootstrap';
import { queryDistrict } from './ProfileActions';
/**
* Either show the user their congressional district or a button to set it
*/
const CongressionalDistrict = (props) => {
const d = props.d... | import React, { PropTypes } from 'react';
import { connect } from 'react-redux';
import { Button } from 'react-bootstrap';
import { queryDistrict, fetchDistrict } from './ProfileActions';
/**
* Either show the user their congressional district or a button to set it
*/
class CongressionalDistrict extends React.Compo... | Allow congressional district widget to fetch data on mount | Allow congressional district widget to fetch data on mount
| JSX | mit | gnmerritt/dailyrippl,gnmerritt/dailyrippl,gnmerritt/dailyrippl,gnmerritt/dailyrippl | ---
+++
@@ -2,30 +2,40 @@
import { connect } from 'react-redux';
import { Button } from 'react-bootstrap';
-import { queryDistrict } from './ProfileActions';
+import { queryDistrict, fetchDistrict } from './ProfileActions';
/**
* Either show the user their congressional district or a button to set it
*/
-c... |
6065e8497a150d151ab1d7937b105f65a92f69e6 | app/CircuitDiagram.jsx | app/CircuitDiagram.jsx | /* @flow */
'use strict';
import React from 'react';
import ReactArt from 'react-art';
import Circle from 'react-art/lib/Circle.art'
var Surface = ReactArt.Surface;
export default class CircuitDiagram extends React.Component {
/**
* [constructor description]
* @param {object} props
* @param {number} pr... | /* @flow */
'use strict';
import React from 'react';
import ReactArt from 'react-art';
import Circle from 'react-art/lib/Circle.art'
var Surface = ReactArt.Surface;
export default class CircuitDiagram extends React.Component {
/**
* [constructor description]
* @param {object} props
* @param {number} pr... | Use default width/height for circuit diagram | Use default width/height for circuit diagram
| JSX | epl-1.0 | circuitsim/circuit-simulator,circuitsim/circuit-simulator,circuitsim/circuit-simulator | ---
+++
@@ -38,5 +38,9 @@
</Surface>
);
}
+}
-}
+CircuitDiagram.defaultProps = {
+ width: 700,
+ height: 700
+}; |
bee9fab609889bf8701e14d45b12756077ed5588 | src/App.jsx | src/App.jsx | import React from 'react';
import { BrowserRouter, Switch, Route } from 'react-router-dom';
import { ThemeProvider } from '../lib';
import Home from './Home';
import Installation from './Installation';
import Components from './Components';
import FourOhFour from './FourOhFour';
const urlBase = process.env.NODE_ENV =... | import React from 'react';
import { BrowserRouter, Switch, Route } from 'react-router-dom';
import { ThemeProvider } from '../lib';
import Home from './Home';
import Installation from './Installation';
import Components from './Components';
import FourOhFour from './FourOhFour';
const urlBase = process.env.NODE_ENV =... | Use correct comparison for env | Use correct comparison for env
| JSX | mit | crystal-ball/componentry,crystal-ball/componentry,crystal-ball/componentry | ---
+++
@@ -7,7 +7,7 @@
import Components from './Components';
import FourOhFour from './FourOhFour';
-const urlBase = process.env.NODE_ENV === true ? '/componentry/' : '/';
+const urlBase = process.env.NODE_ENV === 'production' ? '/componentry/' : '/';
// Componentry configuration defaults can be updated usin... |
ca86549f9580492364e8a087bebf2503bd1684e7 | assets/js/clock.jsx | assets/js/clock.jsx | var div_page = document.getElementsByClassName('page')[0];
class Relogio extends React.Component {
render() {
return (
<div className="container">
<h1>Olá mundo!</h1>
<h2>Agora são {this.props.horarioAtual.toLocaleTimeString()}.</h2>
</div>
);
}
}
function tique() {
ReactDOM.... | var div_page = document.getElementsByClassName('page')[0];
class Relogio extends React.Component {
constructor(props) {
super(props); // Todo componente-classe deve chamar o super com props.
this.state = {horarioAtual: new Date()};
}
render() {
return (
<div className="container">
<h1... | Move a variável "horarioAtual" de props para state | Move a variável "horarioAtual" de props para state
| JSX | mit | gustavosotnas/SandboxReact,gustavosotnas/SandboxReact | ---
+++
@@ -1,11 +1,17 @@
var div_page = document.getElementsByClassName('page')[0];
class Relogio extends React.Component {
+
+ constructor(props) {
+ super(props); // Todo componente-classe deve chamar o super com props.
+ this.state = {horarioAtual: new Date()};
+ }
+
render() {
return (
... |
69f2611436e33825ce3401bb501a8c9f825ddeff | client/app/Components/CreateSessionDetail.jsx | client/app/Components/CreateSessionDetail.jsx | import React from 'react';
import { Button, FormGroup, Form, Col, FormControl, ControlLabel } from 'react-bootstrap';
class NodeDetail extends React.Component {
onSubmit(e, props) {
e.preventDefault();
this.props.clearComments();
this.props.thunkCreateSession(e.target.title.value, e.target.text.value, t... | import React from 'react';
import { Button, FormGroup, Form, Col, FormControl, ControlLabel } from 'react-bootstrap';
class NodeDetail extends React.Component {
onSubmit(e, props) {
e.preventDefault();
this.props.clearComments();
this.props.thunkCreateSession(e.target.title.value, e.target.text.value, t... | Initialize css styling for create session modal | Initialize css styling for create session modal
| JSX | mit | Ada323/brainstorm,Ada323/brainstorm,conundrum-inc/brainstorm,conundrum-inc/brainstorm | ---
+++
@@ -12,7 +12,7 @@
render() {
return (
- <div>
+ <div className="ReactModal__Content--after-open--new-session">
<h2>Start a Sesh</h2>
<Form horizontal onSubmit={this.onSubmit.bind(this)}>
<FormGroup controlId="commentTitle"> |
119ddc6dda625c97a199d333ee0ef6fa99bc615e | assets/js/components/paged-table.jsx | assets/js/components/paged-table.jsx | import React from 'react'
import Pager from './pager'
export default class PagedTable extends React.Component {
constructor(props){
super(props);
this.state = {
page: 0
};
this.handlePageChange = this.handlePageChange.bind(this);
}
pageCount(){
return M... | import React from 'react'
import Pager from './pager'
export default class PagedTable extends React.Component {
constructor(props){
super(props);
this.state = {
page: 0
};
this.handlePageChange = this.handlePageChange.bind(this);
}
pageCount(){
return Ma... | Fix pager error when PagedTable contains no element | Fix pager error when PagedTable contains no element
| JSX | mit | p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles | ---
+++
@@ -1,5 +1,4 @@
import React from 'react'
-
import Pager from './pager'
export default class PagedTable extends React.Component {
@@ -12,7 +11,7 @@
}
pageCount(){
- return Math.ceil(React.Children.count(this.props.children)/this.props.perPage);
+ return Math.max(1, Math.ceil(Rea... |
f3434d06f5ebf6a6e4effc4fd2699a9cdf591e9e | src/components/error-boundary.jsx | src/components/error-boundary.jsx | import { PureComponent } from 'react';
import * as Sentry from '@sentry/react';
class ErrorBoundary extends PureComponent {
constructor(props) {
super(props);
this.state = { hasError: false, error: {}, errorInfo: {} };
}
static getDerivedStateFromError(error) {
return { hasError: true, error };
}
... | /* global CONFIG */
import { PureComponent } from 'react';
import * as Sentry from '@sentry/react';
class ErrorBoundary extends PureComponent {
constructor(props) {
super(props);
this.state = { hasError: false, error: {}, errorInfo: {} };
}
static getDerivedStateFromError(error) {
return { hasError:... | Make the ErrorBoundary message more verbose, mention the Beta instance | Make the ErrorBoundary message more verbose, mention the Beta instance | JSX | mit | FreeFeed/freefeed-react-client,FreeFeed/freefeed-react-client,FreeFeed/freefeed-react-client | ---
+++
@@ -1,3 +1,4 @@
+/* global CONFIG */
import { PureComponent } from 'react';
import * as Sentry from '@sentry/react';
@@ -20,14 +21,9 @@
}
render() {
- const { error, errorInfo, hasError } = this.state;
+ const { error, hasError } = this.state;
if (hasError) {
- const errorLocatio... |
b518e90a3691b32f6328af0a5b68c3104396cb61 | client/src/components/Users.jsx | client/src/components/Users.jsx | import React from 'react';
import { Link } from 'react-router-dom';
import { GridList, GridTile } from 'material-ui/GridList';
const Users = (props) => {
return (
<div>
<GridList cellHeight="auto" cols={5} padding={15}>
{props.users
.map((user)=>(
<div key={user.id}>
<span classNam... | import React from 'react';
import { Link } from 'react-router-dom';
import { GridList, GridTile } from 'material-ui/GridList';
const Users = (props) => {
return (
<div className="item largeSidePadding">
<GridList cellHeight="auto" cols={props.usersCount}>
{props.users
.map((user)=>(
<div key=... | Add div centering and adaptive number of columns to number of users | Add div centering and adaptive number of columns to number of users
| JSX | mit | SentinelsOfMagic/SentinelsOfMagic | ---
+++
@@ -4,8 +4,8 @@
const Users = (props) => {
return (
- <div>
- <GridList cellHeight="auto" cols={5} padding={15}>
+ <div className="item largeSidePadding">
+ <GridList cellHeight="auto" cols={props.usersCount}>
{props.users
.map((user)=>(
|
468fd4a0051b63ecd0a2f3e36a51079c1ccb0238 | src/components/TagTemplateDetails/index.jsx | src/components/TagTemplateDetails/index.jsx | import React from 'react'
import Post from '../Post'
class TagTemplateDetails extends React.Component {
render() {
const { i18n } = this.props
const posts = this.props.data.allMarkdownRemark.edges
const items = posts
.filter(post => {
const postLang = post.node.fields.slug.startsWith('/fr/... | import React from 'react'
import Post from '../Post'
class TagTemplateDetails extends React.Component {
render() {
const { i18n } = this.props
const posts = this.props.data.allMarkdownRemark.edges
const items = posts
.filter(post => {
const postLang = post.node.fields.slug.startsWith('/fr/... | Fix text for tag template page | Fix text for tag template page
| JSX | mit | nicoespeon/nicoespeon.github.io,nicoespeon/nicoespeon.github.io | ---
+++
@@ -15,8 +15,8 @@
const tagTitle = this.props.pageContext.tag
const title = {
- en: `All Posts tagged as "${tagTitle}" `,
- fr: `Tous les articles portant le tag "${tagTitle}"`,
+ en: `All posts tagged as "${tagTitle}"`,
+ fr: `Tous les articles tagués "${tagTitle}"`,
}[i1... |
84a58606853dfece23aa294a2c91fa47c6d4eea1 | src/createSliderWithTooltip.jsx | src/createSliderWithTooltip.jsx | import React from 'react';
import PropTypes from 'prop-types';
import Tooltip from 'rc-tooltip';
import Handle from './Handle';
export default function createSliderWithTooltip(Component) {
return class ComponentWrapper extends React.Component {
static propTypes = {
tipFormatter: PropTypes.func,
};
... | import React from 'react';
import PropTypes from 'prop-types';
import Tooltip from 'rc-tooltip';
import Handle from './Handle';
export default function createSliderWithTooltip(Component) {
return class ComponentWrapper extends React.Component {
static propTypes = {
tipFormatter: PropTypes.func,
};
... | Fix issue with multiple tooltips showing | Fix issue with multiple tooltips showing
| JSX | mit | react-component/slider,react-component/slider | ---
+++
@@ -16,11 +16,13 @@
this.state = { visibles: {} };
}
handleTooltipVisibleChange = (index, visible) => {
- this.setState({
- visibles: {
- ...this.state.visibles,
- [index]: visible,
- },
+ this.setState((prevState) => {
+ return {
+ vi... |
e913f48ebe9fa165ff6afcf04e4d99a926f85a44 | src/client/components/SearchBox/SearchBox.jsx | src/client/components/SearchBox/SearchBox.jsx | import React, { Component, PropTypes } from 'react';
import classNames from 'classnames';
class SearchBox extends Component {
render() {
const {hasIcon, ...props} = this.props
const classes = classNames('searchbox-content', this.props.className, {
"mdi mdi-magnify": hasIcon
});
... | import React, { Component, PropTypes } from 'react';
import classNames from 'classnames';
class SearchBox extends Component {
render() {
const {hasIcon, ...props} = this.props
const classes = classNames('searchbox-content', this.props.className, {
"mdi mdi-magnify": hasIcon
});
... | Set default hasIcon to false | Set default hasIcon to false
| JSX | mit | AdamSalma/Lurka,AdamSalma/Lurka | ---
+++
@@ -19,7 +19,7 @@
}
SearchBox.defaultProps = {
- hasIcon: true
+ hasIcon: false
}
export default SearchBox |
3a99297b7e7766e28a5356a8de2955a60f29c934 | src/connection/enterprise/kerberos_screen.jsx | src/connection/enterprise/kerberos_screen.jsx | import React from 'react';
import Screen from '../../core/screen';
import QuickAuthPane from '../../ui/pane/quick_auth_pane';
import { logIn, skipQuickAuth } from '../../quick-auth/actions';
import { renderSignedInConfirmation } from '../../core/signed_in_confirmation';
import * as l from '../../core/index';
import { c... | import React from 'react';
import Screen from '../../core/screen';
import QuickAuthPane from '../../ui/pane/quick_auth_pane';
import { logIn, skipQuickAuth } from '../../quick-auth/actions';
import { renderSignedInConfirmation } from '../../core/signed_in_confirmation';
import * as l from '../../core/index';
import { c... | Use i18n prop instead of t in Kerberos screen | Use i18n prop instead of t in Kerberos screen
| JSX | mit | mike-casas/lock,mike-casas/lock,mike-casas/lock | ---
+++
@@ -6,15 +6,15 @@
import * as l from '../../core/index';
import { corpNetworkConnection } from '../enterprise';
-const Component = ({model, t}) => {
- const headerText = t("windowsAuthInstructions") || null;
+const Component = ({i18n, model}) => {
+ const headerText = i18n.html("windowsAuthInstructions"... |
a42e40f16f47394036393818810f71b29ecf1a62 | src/js/popup/components/DomainContainer.jsx | src/js/popup/components/DomainContainer.jsx | import React from 'react';
import PropTypes from 'prop-types';
import DomainItem from './DomainItem';
const DomainContainer = props => (
props.container.length !== 0 ?
<ul className='domain-container'>
{props.container.map((validDomain, id) => (
<DomainItem
{...validDomain}
{...... | import React from 'react';
import PropTypes from 'prop-types';
import DomainItem from './DomainItem';
const DomainContainer = props => (
props.container.length !== 0 ?
<ul className='domain-container'>
{props.container.map(domain => (
<DomainItem
{...domain}
{...props}
... | Remove array index for key usage | Remove array index for key usage
| JSX | mit | williamgrosset/fokus,williamgrosset/fokus,williamgrosset/fokus | ---
+++
@@ -5,11 +5,11 @@
const DomainContainer = props => (
props.container.length !== 0 ?
<ul className='domain-container'>
- {props.container.map((validDomain, id) => (
+ {props.container.map(domain => (
<DomainItem
- {...validDomain}
+ {...domain}
{...props... |
fc4d8db12735aa586ecafa217e14582dfc9f2f55 | EvolvingSample/helloworld.jsx | EvolvingSample/helloworld.jsx | var FirstName = React.createClass({
render: function() {
return (
<div>
<strong>First name: </strong> <input type="text" placeholder="First name" />
</div>
);
}
});
var LastName = React.createClass({
render: function() {
return (
<div>
... | var FirstName = React.createClass({
render: function() {
return (
<div>
<strong>First name: </strong> <input type="text" placeholder="First name" value={this.props.value} />
</div>
);
}
});
var LastName = React.createClass({
render: function() {
ret... | Add full name (bindings not working yet) | Add full name (bindings not working yet)
| JSX | mit | tugberkugurlu/ReactJsSamples,tugberkugurlu/ReactJsSamples,tugberkugurlu/ReactJsSamples,tugberkugurlu/ReactJsSamples | ---
+++
@@ -2,7 +2,7 @@
render: function() {
return (
<div>
- <strong>First name: </strong> <input type="text" placeholder="First name" />
+ <strong>First name: </strong> <input type="text" placeholder="First name" value={this.props.value} />
</div>
... |
6cfc36016bc3a93564d3fdf08b4fb233b2ea7016 | app/operator/visitors/index.jsx | app/operator/visitors/index.jsx | import React from 'react';
import Visitor from './visitor';
import * as actions from '../actions'
export default React.createClass({
propTypes: {
visitors: React.PropTypes.arrayOf(React.PropTypes.shape({
userId: React.PropTypes.string.isRequired,
userName: React.PropTypes.string.isR... | import React from 'react';
import Visitor from './visitor';
import * as actions from '../actions'
export default React.createClass({
propTypes: {
visitors: React.PropTypes.arrayOf(React.PropTypes.shape({
userId: React.PropTypes.string.isRequired
})).isRequired,
dispatch: React.P... | Remove unneeded props assertions from Visitors component | Remove unneeded props assertions from Visitors component | JSX | apache-2.0 | JustBlackBird/mibew-ui,JustBlackBird/mibew-ui | ---
+++
@@ -5,15 +5,7 @@
export default React.createClass({
propTypes: {
visitors: React.PropTypes.arrayOf(React.PropTypes.shape({
- userId: React.PropTypes.string.isRequired,
- userName: React.PropTypes.string.isRequired,
- firstTime: React.PropTypes.number.isRequired,... |
67e44da18ada4c4d5605c5113060a9f2fae85a00 | src/app.jsx | src/app.jsx | require('bootstrap/dist/css/bootstrap.min.css');
const React = require('react');
const LearnMath = require('./learn-math');
class App extends React.Component {
render() {
return (
<LearnMath
sign={'-'}
/>
)
}
}
module.exports = App;
| require('bootstrap/dist/css/bootstrap.min.css');
const React = require('react');
const LearnMath = require('./learn-math');
class App extends React.Component {
constructor() {
super();
this.state = {
setup: true
};
}
render() {
return (
<LearnMath
sign={'+'}
/>
)
... | Switch default back to + for now | Switch default back to + for now
| JSX | mit | guyellis/learn,guyellis/learn | ---
+++
@@ -3,10 +3,17 @@
const LearnMath = require('./learn-math');
class App extends React.Component {
+ constructor() {
+ super();
+ this.state = {
+ setup: true
+ };
+ }
+
render() {
return (
<LearnMath
- sign={'-'}
+ sign={'+'}
/>
)
} |
fef7a1650aecd7ffc28c9c80546a74a90cca96a4 | client/app/home/BikePreview.jsx | client/app/home/BikePreview.jsx | var React = require('react/addons'),
hotkey = require('react-hotkey'),
PureRenderMixin = React.addons.PureRenderMixin,
IconButton = require('../../components/buttons/IconButton.jsx')
var BikePreview = React.createClass({
mixins: [PureRenderMixin, hotkey.Mixin('_handleHotkey')],
propTypes: {
closePreview:... | var React = require('react/addons'),
hotkey = require('react-hotkey'),
PureRenderMixin = React.addons.PureRenderMixin,
IconButton = require('../../components/buttons/IconButton.jsx')
var BikePreview = React.createClass({
mixins: [PureRenderMixin, hotkey.Mixin('_handleHotkey')],
propTypes: {
closePreview:... | Use classList.contains instead of classNames.indexOf | Use classList.contains instead of classNames.indexOf
| JSX | apache-2.0 | cesarandreu/bshed,cesarandreu/bshed | ---
+++
@@ -30,7 +30,7 @@
},
_closeOnClick: function (e) {
- if (e.target.className.indexOf('bike-preview-content') > -1)
+ if (e.target.classList.contains('bike-preview-content'))
this.props.closePreview()
},
|
8e5b6a788e5431f1da7427a1e2e99863e8632624 | app/classifier/tasks/highlighter/label-editor.jsx | app/classifier/tasks/highlighter/label-editor.jsx | import React from 'react';
export default function LabelEditor(props) {
function deleteAnnotation(annotation) {
const index = props.annotation.value.indexOf(annotation);
props.annotation.value.splice(index, 1);
props.classification.update('annotations');
}
function onClick(e) {
if (e.data && e.d... | import React from 'react';
export default function LabelEditor(props) {
function deleteAnnotation(annotation) {
const index = props.annotation.value.indexOf(annotation);
props.annotation.value.splice(index, 1);
props.onChange(props.annotation);
}
function onClick(e) {
if (e.data && e.data.text &... | Remove classification.update from highlighter task | Remove classification.update from highlighter task
| JSX | apache-2.0 | amyrebecca/Panoptes-Front-End,amyrebecca/Panoptes-Front-End,zooniverse/Panoptes-Front-End,amyrebecca/Panoptes-Front-End | ---
+++
@@ -4,7 +4,7 @@
function deleteAnnotation(annotation) {
const index = props.annotation.value.indexOf(annotation);
props.annotation.value.splice(index, 1);
- props.classification.update('annotations');
+ props.onChange(props.annotation);
}
function onClick(e) { |
d717a6231d4a0d43fe63190bf4105dc685d9a641 | views/components/Announcements/Container.jsx | views/components/Announcements/Container.jsx | 'use babel';
import React, { Component } from 'react';
import JsonWatch from 'jsonwatch';
import Annoncement from './Item';
import Storage from './../../../controllers/storage';
export default class Container extends Component {
constructor(props) {
super(props);
this.state = {
list: Storage.dataDb.ge... | 'use babel';
import React, { Component } from 'react';
import JsonWatch from 'jsonwatch';
import Annoncement from './Item';
import Storage from './../../../controllers/storage';
export default class Container extends Component {
constructor(props) {
super(props);
this.state = {
list: Storage.dataDb.ge... | Fix render problem while data is empty | Fix render problem while data is empty
| JSX | mit | amoshydra/nus-notify,amoshydra/nus-notify | ---
+++
@@ -12,6 +12,7 @@
list: Storage.dataDb.get('list').value()
};
this.observeDatabase();
+ this.renderList = this.renderList.bind(this);
}
observeDatabase() {
@@ -30,21 +31,22 @@
});
}
+ renderList() {
+ if (this.state.list && this.state.list.length > 0) {
+ return ... |
772ebabe20bd658441a2621dc62b24d76feb99c4 | src/components/Jumbotron.jsx | src/components/Jumbotron.jsx | import React from 'react';
import MediaQuery from 'react-responsive';
import FadeIn from './FadeIn';
export default function Jumbotron({ bgp, pathname, landing, img, children }) {
const styles = {
backgroundSize: 'cover',
backgroundPosition: bgp ? bgp : 'center 20%',
};
const scrim = `
linear-gradie... | import React from 'react';
import MediaQuery from 'react-responsive';
import FadeIn from './FadeIn';
export default function Jumbotron({ bgp, pathname, landing, img, children }) {
const styles = {
backgroundSize: landing ? null : 'cover',
backgroundPosition: bgp ? bgp : 'center 20%',
backgroundColor: lan... | Change background size and color based on landing attribute | Change background size and color based on landing attribute
| JSX | mit | emyarod/afw,emyarod/afw | ---
+++
@@ -4,8 +4,9 @@
export default function Jumbotron({ bgp, pathname, landing, img, children }) {
const styles = {
- backgroundSize: 'cover',
+ backgroundSize: landing ? null : 'cover',
backgroundPosition: bgp ? bgp : 'center 20%',
+ backgroundColor: landing ? '#86eaef' : null,
};
con... |
fbbe6f0ee0b661eb0acac0be0be1c4bbbc3116db | src/purchase_upgrade.jsx | src/purchase_upgrade.jsx | export function purchaseUpgrade(state, item) {
if (state.get("code") >= state.getIn(["upgrades", "purchasables", item, "cost"])) {
return state.updateIn(["upgrades", "purchasables", item, "owned"], val => val + 1);
} else {
return state
}
} | export function purchaseUpgrade(state, item) {
let cost = state.getIn(["upgrades", "purchasables", item, "cost"])
if (state.get("code") >= cost) {
return state.withMutations(state => {
state.updateIn(["player", "codeSpent"], val => val + cost);
state.updateIn(["upgrades", "purchasables", item, "owned"], val =... | Update purchaseUpgrade to update all player stats on purchase | Update purchaseUpgrade to update all player stats on purchase
| JSX | mit | its-swats/idle-code,its-swats/idle-code | ---
+++
@@ -1,8 +1,17 @@
export function purchaseUpgrade(state, item) {
- if (state.get("code") >= state.getIn(["upgrades", "purchasables", item, "cost"])) {
- return state.updateIn(["upgrades", "purchasables", item, "owned"], val => val + 1);
+ let cost = state.getIn(["upgrades", "purchasables", item, "cost"])
+ i... |
18e8f76cf9d53b7cd3e23b56fbd9e24beb1734e3 | docs/src/Examples/Demo/BasicDatePicker.jsx | docs/src/Examples/Demo/BasicDatePicker.jsx | import React, { Fragment, PureComponent } from 'react';
import { DatePicker } from 'material-ui-pickers';
export default class BasicDatePicker extends PureComponent {
state = {
selectedDate: new Date(),
}
handleDateChange = (date) => {
this.setState({ selectedDate: date });
}
render() {
const {... | import React, { Fragment, PureComponent } from 'react';
import { DatePicker } from 'material-ui-pickers';
export default class BasicDatePicker extends PureComponent {
state = {
selectedDate: new Date(),
}
handleDateChange = (date) => {
this.setState({ selectedDate: date });
}
render() {
const {... | Remove testing props from docs example | Remove testing props from docs example
| JSX | mit | rscnt/material-ui,dmtrKovalenko/material-ui-pickers,rscnt/material-ui,callemall/material-ui,rscnt/material-ui,callemall/material-ui,dmtrKovalenko/material-ui-pickers,mui-org/material-ui,callemall/material-ui,mui-org/material-ui,oliviertassinari/material-ui,mbrookes/material-ui,oliviertassinari/material-ui,callemall/mat... | ---
+++
@@ -40,7 +40,7 @@
<DatePicker
label="With today button"
showTodayButton
- maxDate="2019-01-01"
+ disableFuture
maxDateMessage="Date must be less than today"
value={selectedDate}
onChange={this.handleDateChange} |
b1f3751eef5484490c5d64e9cf4ca51aa1a058fd | src/components/crash-message/crash-message.jsx | src/components/crash-message/crash-message.jsx | /* eslint-disable react/jsx-no-literals */
/*
@todo Rule is disabled because this component is rendered outside the
intl provider right now so cannot be translated.
*/
import PropTypes from 'prop-types';
import React from 'react';
import Box from '../box/box.jsx';
import styles from './crash-message.css';
imp... | import PropTypes from 'prop-types';
import React from 'react';
import Box from '../box/box.jsx';
import {FormattedMessage} from 'react-intl';
import styles from './crash-message.css';
import reloadIcon from './reload.svg';
const CrashMessage = props => (
<div className={styles.crashWrapper}>
<Box classNam... | Add Intl to Crash Message Component. | Add Intl to Crash Message Component.
| JSX | bsd-3-clause | cwillisf/scratch-gui,cwillisf/scratch-gui,cwillisf/scratch-gui,LLK/scratch-gui,LLK/scratch-gui | ---
+++
@@ -1,12 +1,7 @@
-/* eslint-disable react/jsx-no-literals */
-/*
- @todo Rule is disabled because this component is rendered outside the
- intl provider right now so cannot be translated.
-*/
-
import PropTypes from 'prop-types';
import React from 'react';
import Box from '../box/box.jsx';
+import {F... |
a67d307e7f266060f01ada61484662f3f57d145a | src/field/phone-number/ask_phone_number.jsx | src/field/phone-number/ask_phone_number.jsx | import React from 'react';
import Screen from '../../core/screen';
import PhoneNumberPane from './phone_number_pane';
import { renderAskLocation } from './ask_location';
import { cancelSelectPhoneLocation } from './actions';
import { selectingLocation } from './index';
const Component = ({focusSubmit, model, t}) => (
... | import React from 'react';
import Screen from '../../core/screen';
import PhoneNumberPane from './phone_number_pane';
import { renderAskLocation } from './ask_location';
import { cancelSelectPhoneLocation } from './actions';
import { selectingLocation } from './index';
const Component = ({focusSubmit, i18n, model}) =>... | Use i18n prop instead of t in AskPhoneNumber | Use i18n prop instead of t in AskPhoneNumber
| JSX | mit | mike-casas/lock,mike-casas/lock,mike-casas/lock | ---
+++
@@ -5,11 +5,11 @@
import { cancelSelectPhoneLocation } from './actions';
import { selectingLocation } from './index';
-const Component = ({focusSubmit, model, t}) => (
+const Component = ({focusSubmit, i18n, model}) => (
<PhoneNumberPane
focusSubmit={focusSubmit}
lock={model}
- placeholder... |
cf71a6b5e8656f3397d38a69ded002be45b60c3c | app/javascript/packs/agendum/agendum_list.jsx | app/javascript/packs/agendum/agendum_list.jsx | import React from 'react';
// Controls
import Agendum from './agendum';
// Utils
import _ from 'lodash';
/*
* Create a list of Agendum.
*/
const AgendumList = (props) => {
return(
<div className="row">
{
props.agenda.map((agendum) => {
return(
... | import React from 'react';
// Controls
import Agendum from './agendum';
// Utils
import _ from 'lodash';
/*
* Create a list of Agendum.
*/
const AgendumList = (props) => {
return(
<div className="row">
{
props.agenda.map((agendum) => {
return(
... | Fix new agendum bug. Adding a new agendum was resulting in the text from the new agendum being displayed in the new agendum button. | Fix new agendum bug.
Adding a new agendum was resulting in the
text from the new agendum being displayed
in the new agendum button.
| JSX | mit | robyparr/adjourn,robyparr/adjourn,robyparr/adjourn | ---
+++
@@ -25,7 +25,7 @@
}
{/* Add new Agendum item */}
<div className="col m4">
- <Agendum
+ <Agendum key={new Date()}
meetingID={props.meetingID}
handleAgendumAddRemove={props.handleAgendumAddRemove} />
... |
c0fc7e5fbd283626367e1a56f823abec24f3ea6d | ui/component/claimInsufficientCredits/view.jsx | ui/component/claimInsufficientCredits/view.jsx | // @flow
import * as React from 'react';
import Button from 'component/button';
import I18nMessage from 'component/i18nMessage';
type Props = {
uri: string,
fileInfo: FileListItem,
isInsufficientCredits: boolean,
claimWasPurchased: boolea,
};
function ClaimInsufficientCredits(props: Props) {
const { isInsuf... | // @flow
import * as React from 'react';
import Button from 'component/button';
import I18nMessage from 'component/i18nMessage';
type Props = {
uri: string,
fileInfo: FileListItem,
isInsufficientCredits: boolean,
claimWasPurchased: boolean,
};
function ClaimInsufficientCredits(props: Props) {
const { isInsu... | Fix boolean declaration in claimInsufficientCredits | Fix boolean declaration in claimInsufficientCredits | JSX | mit | lbryio/lbry-app,lbryio/lbry-electron,lbryio/lbry-electron,lbryio/lbry-electron,lbryio/lbry-app | ---
+++
@@ -7,7 +7,7 @@
uri: string,
fileInfo: FileListItem,
isInsufficientCredits: boolean,
- claimWasPurchased: boolea,
+ claimWasPurchased: boolean,
};
function ClaimInsufficientCredits(props: Props) { |
d34746f29bcd94e9fcdeb22d34502d7644e0a19d | src/components/connection-modal/device-tile.jsx | src/components/connection-modal/device-tile.jsx | import {FormattedMessage} from 'react-intl';
import PropTypes from 'prop-types';
import React from 'react';
import Box from '../box/box.jsx';
import styles from './connection-modal.css';
//@todo make this into a 'class component'
const DeviceTile = props => (
<Box className={styles.deviceTile}>
<Box>
... | import {FormattedMessage} from 'react-intl';
import PropTypes from 'prop-types';
import React from 'react';
import bindAll from 'lodash.bindall';
import Box from '../box/box.jsx';
import styles from './connection-modal.css';
class DeviceTile extends React.Component {
constructor (props) {
super(props);
... | Make device tile into a class component | Make device tile into a class component
| JSX | bsd-3-clause | cwillisf/scratch-gui,LLK/scratch-gui,cwillisf/scratch-gui,LLK/scratch-gui,cwillisf/scratch-gui | ---
+++
@@ -1,36 +1,48 @@
import {FormattedMessage} from 'react-intl';
import PropTypes from 'prop-types';
import React from 'react';
-
+import bindAll from 'lodash.bindall';
import Box from '../box/box.jsx';
import styles from './connection-modal.css';
-//@todo make this into a 'class component'
-const Devi... |
4edf7175ca62ba5b574368a3e0c6f35af3cf11d4 | src/cred/phone_number_input.jsx | src/cred/phone_number_input.jsx | import React from 'react';
import InputWrap from './input_wrap';
import Icon from '../icon/icon';
export default class PhoneNumberInput extends React.Component {
constructor(props) {
super(props);
this.state = {};
}
render() {
const { isValid, ...props } = this.props;
const { focused } = this.st... | import React from 'react';
import InputWrap from './input_wrap';
import Icon from '../icon/icon';
export default class PhoneNumberInput extends React.Component {
constructor(props) {
super(props);
this.state = {};
}
render() {
const { isValid, ...props } = this.props;
const { focused } = this.st... | Use type="tel" for phone number input | Use type="tel" for phone number input
This will make some mobile devices will show a numeric keyboard.
| JSX | mit | auth0/lock-passwordless,mike-casas/lock,mike-casas/lock,auth0/lock-passwordless,mike-casas/lock,auth0/lock-passwordless | ---
+++
@@ -15,7 +15,7 @@
return (
<InputWrap name="phone-number" isValid={isValid} icon={<Icon name="phoneNumber" />} focused={focused}>
<input ref="input"
- type="text"
+ type="tel"
name="phoneNumber"
className="auth0-lock-input auth0-lock-input-number"
... |
c309582fe8b86a26733f09deeb268da8de5fe873 | ditto/static/tidy/js/comments/CommentForm.jsx | ditto/static/tidy/js/comments/CommentForm.jsx | import React from 'react';
export default class CommentForm extends React.Component {
// TODO static propTypes
render () {
return (
<form onSubmit={this._onSubmit}>
<div className="form-group">
<label forHtml="comment">Add Comment:</label>
<textarea className="form-control" id="comment" re... | import React from 'react';
import Validate from '../lib/form/Validate.jsx';
export default class CommentForm extends React.Component {
static propTypes = {
onSubmit: React.PropTypes.func.isRequired,
}
state = {
comment: ""
}
render () {
return (
<form onSubmit={this._onSubmit}>
<div... | Disable submit button until comment is entered | Disable submit button until comment is entered
| JSX | bsd-3-clause | Kvoti/ditto,Kvoti/ditto,Kvoti/ditto,Kvoti/ditto,Kvoti/ditto | ---
+++
@@ -1,15 +1,31 @@
import React from 'react';
+import Validate from '../lib/form/Validate.jsx';
export default class CommentForm extends React.Component {
- // TODO static propTypes
+ static propTypes = {
+ onSubmit: React.PropTypes.func.isRequired,
+ }
+ state = {
+ comment: ""
+ }
+
... |
2e97ee2e152094ed216ca5ee3bc2ab1c90dc67ec | frontend/components/topic-input.jsx | frontend/components/topic-input.jsx | import React, { Component } from 'react'
import {Creatable} from 'react-select'
import css from 'react-select/dist/react-select.css'
export default class TopicInput extends Component {
constructor(props){
super(props);
this.state = {
topics: [],
}
this.handleSelect = this.handleSelect.bind(this... | import React, { Component } from 'react'
import {Creatable} from 'react-select'
import css from 'react-select/dist/react-select.css'
export default class TopicInput extends Component {
constructor(props){
super(props);
let topics = [];
if (props.value){
topics = props.value.split(',').map(e => { re... | Fix issue with editing courses and preserving topics | Fix issue with editing courses and preserving topics
| JSX | mit | p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles | ---
+++
@@ -5,9 +5,11 @@
export default class TopicInput extends Component {
constructor(props){
super(props);
- this.state = {
- topics: [],
+ let topics = [];
+ if (props.value){
+ topics = props.value.split(',').map(e => { return {label: e, value: e};});
}
+ this.state = {topics... |
ce2ad20fd73abb862d20b828e7fd85126299d8bc | examples/react-chayns-rfid_input/Example.jsx | examples/react-chayns-rfid_input/Example.jsx | import React from 'react';
import { RfidInput } from '../../src/index';
import '../../src/react-chayns-rfid_input/index.scss';
import ExampleContainer from '../ExampleContainer';
export default class Example extends React.Component {
constructor() {
super();
this.state = {
rfidInput: ... | import React from 'react';
import { RfidInput } from '../../src/index';
import '../../src/react-chayns-rfid_input/index.scss';
import ExampleContainer from '../ExampleContainer';
export default class Example extends React.Component {
constructor() {
super();
this.state = {
rfidInput: ... | Add usage of isNfcAvailable to example Improve CodeStyle on rfid-example | Add usage of isNfcAvailable to example
Improve CodeStyle on rfid-example
| JSX | mit | TobitSoftware/chayns-components,TobitSoftware/chayns-components,TobitSoftware/chayns-components | ---
+++
@@ -23,24 +23,26 @@
};
render() {
- return(
+ const { rfid, rfidInput } = this.state;
+
+ return (
<ExampleContainer headline="RFID Input">
<h3>RFID-Live</h3>
- <p>{this.state.rfidInput || '-'}</p>
+ <p>{rfidInput || ... |
fc6c28ac6dd79c3250e0d9c75c5796af7c2ec6d0 | src/js/monsterlistcontrol.jsx | src/js/monsterlistcontrol.jsx | import React from 'react';
const MonsterListControl = React.createClass({
proptTypes: {
showControls: React.PropTypes.bool.isRequired,
dispatch: React.PropTypes.func.isRequired,
monsterID: React.PropTypes.number.isRequired,
visibleId: React.PropTypes.number.isRequired
},
render () {
let class... | import React from 'react';
const MonsterListControl = React.createClass({
proptTypes: {
showControls: React.PropTypes.bool.isRequired,
dispatch: React.PropTypes.func.isRequired,
monsterID: React.PropTypes.number.isRequired,
visibleId: React.PropTypes.number.isRequired
},
render () {
let class... | Rename event handlers. Add USE handler | Rename event handlers. Add USE handler
| JSX | mit | jkrayer/summoner,jkrayer/summoner | ---
+++
@@ -12,13 +12,17 @@
let copy = (this.props.monsterID === this.props.visibleId) ? 'Hide' : 'Show';
return (
<div className={classes}>
- <button type="button" className="button-reset" onClick={this._clickHandler}>{copy}</button>
+ <button type="button" className="button-reset" onC... |
eeecf8ab5ea62a5801c9ca58b86e9ca058cc44c1 | src/client/public/coinbox.jsx | src/client/public/coinbox.jsx | var React = require('react');
var Flux = require('react-flux');
var userStore = require('./flux/stores/user');
var userActions = require('./flux/actions/user');
var App = React.createClass({
mixins: [
userStore.mixin()
],
getStateFromStores: function(){
console.log("App.getStateFromStores");
re... | 'use strict';
var React = require('react');
var Router = require('react-router');
var routes = require('./routes.jsx');
var Route = Router.Route;
document.addEventListener("DOMContentLoaded", function(event) {
Router.run(routes, Router.HistoryLocation, function (Handler, state) {
React.render(<Handler />, doc... | Update main application class to initialize react-router | Update main application class to initialize react-router
| JSX | apache-2.0 | andrewfhart/coinbox,andrewfhart/coinbox | ---
+++
@@ -1,76 +1,12 @@
-var React = require('react');
-var Flux = require('react-flux');
+'use strict';
-var userStore = require('./flux/stores/user');
-var userActions = require('./flux/actions/user');
+var React = require('react');
+var Router = require('react-router');
+var routes = require('./routes.jsx'... |
0a9e040a593e75356e394b5d9288b518314f6e67 | src/components/auth.jsx | src/components/auth.jsx | import React from 'react'
import Config from '../public/config.json'
export default class Auth extends React.Component {
render() {
const host = 'https://accounts.spotify.com'
const redirectUri = `${window.location.protocol}//${window.location.host}/auth`
const scopes = 'user-library-read'
const auth... | import React from 'react'
import Config from '../public/config.json'
export default class Auth extends React.Component {
render() {
const host = 'https://accounts.spotify.com'
const redirectUri = `${window.location.protocol}//${window.location.host}/auth`
const scopes = 'user-library-read'
const auth... | Add intro, bigger login button | Add intro, bigger login button
| JSX | mit | cheshire137/spotty-features,cheshire137/spotty-features | ---
+++
@@ -11,7 +11,18 @@
`&client_id=${Config.spotify.clientId}` +
`&scope=${encodeURIComponent(scopes)}`
return (
- <a href={authUrl}>Sign into Spotify</a>
+ <section className="hero">
+ <div className="hero-body">
+ <div className="container">
+ <h2 classNam... |
adad71197f4156cee87075685de2b5a17cb6f424 | app/components/questions/pieChart.jsx | app/components/questions/pieChart.jsx | import React, { Component } from 'react'
import Pie from 'react-simple-pie-chart'
export default React.createClass ({
getInitialState: function () {
return {
expandedSector: null
}
},
handleMouseEnterOnSector: function (sector) {
this.setState({ expandedSector: sector })
},
handleMouseLea... | import React, { Component } from 'react'
import Pie from 'react-simple-pie-chart'
export default React.createClass ({
getInitialState: function () {
return {
expandedSector: null
}
},
handleMouseEnterOnSector: function (sector) {
this.setState({ expandedSector: sector })
},
handleMouseLea... | Add a link to readme from chart. | Add a link to readme from chart. | JSX | agpl-3.0 | empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core | ---
+++
@@ -36,6 +36,7 @@
</div>
))
}
+ <a href="https://github.com/empirical-org/Quill-Connect/blob/master/app/libs/README.md">How our marking works</a>
</div>
</div>
) |
7a14c51acdc0cdd4b28f2058b82c13ae62722cb3 | src/templates/app/_includes/pep_declaration.jsx | src/templates/app/_includes/pep_declaration.jsx | import React from 'react';
import { Fieldset } from '../../_common/components/forms.jsx';
const PepDeclaration = () => (
<Fieldset legend={it.L('PEP Declaration')}>
<div className='gr-12'>
<p>{it.L('A PEP is an individual who is or has been entrusted with a prominent public function. This statu... | import React from 'react';
import { Fieldset } from '../../_common/components/forms.jsx';
const PepDeclaration = () => (
<Fieldset legend={it.L('PEP Declaration')}>
<div className='gr-12'>
<p>{it.L('A PEP is an individual who is or has been entrusted with a prominent public function. This statu... | Move PEP-tooltip and update its text | Move PEP-tooltip and update its text
| JSX | apache-2.0 | kellybinary/binary-static,kellybinary/binary-static,ashkanx/binary-static,binary-com/binary-static,binary-com/binary-static,binary-static-deployed/binary-static,binary-static-deployed/binary-static,ashkanx/binary-static,4p00rv/binary-static,4p00rv/binary-static,ashkanx/binary-static,kellybinary/binary-static,binary-com... | ---
+++
@@ -4,16 +4,14 @@
const PepDeclaration = () => (
<Fieldset legend={it.L('PEP Declaration')}>
<div className='gr-12'>
- <p>{it.L('A PEP is an individual who is or has been entrusted with a prominent public function. This status extends to a PEP\'s relatives and close associates.')}</p... |
a96dee7b1bff7fb409a798d52d283cd1b9c25175 | app/app/config/routes.jsx | app/app/config/routes.jsx | import React from 'react'
import Main from '../components/Main.jsx'
import CreateUser from '../components/CreateUser.jsx'
import CreateSerf from '../components/CreateSerf.jsx'
import Home from '../components/Home.jsx'
import {Route, IndexRoute} from 'react-router'
const routes = () =>
<Route path="/" component={Main... | import React from 'react'
import Main from '../components/Main.jsx'
import CreateUser from '../components/user/CreateUser.jsx'
import Home from '../components/home/Home.jsx'
import Login from '../components/user/Login.jsx'
import {Route, IndexRoute} from 'react-router'
const CreateUserWrapper = () => <CreateUser myTyp... | Add new route for sessions | Add new route for sessions
| JSX | mit | taodav/MicroSerfs,taodav/MicroSerfs | ---
+++
@@ -1,14 +1,19 @@
import React from 'react'
import Main from '../components/Main.jsx'
-import CreateUser from '../components/CreateUser.jsx'
-import CreateSerf from '../components/CreateSerf.jsx'
-import Home from '../components/Home.jsx'
+import CreateUser from '../components/user/CreateUser.jsx'
+import H... |
5878056e900f715893d57186d3974350a1de8d84 | test/index.jsx | test/index.jsx | import React from 'react';
import { render } from 'react-dom';
import Test from './Test';
render(<Test />, document.getElementById('react-container'));
| import React, { StrictMode } from 'react';
import { render } from 'react-dom';
import Test from './Test';
render(
<StrictMode>
<Test />
</StrictMode>,
document.getElementById('react-container'),
);
| Enable StrictMode in test suite | Enable StrictMode in test suite
| JSX | mit | wojtekmaj/react-calendar,wojtekmaj/react-calendar,wojtekmaj/react-calendar | ---
+++
@@ -1,5 +1,10 @@
-import React from 'react';
+import React, { StrictMode } from 'react';
import { render } from 'react-dom';
import Test from './Test';
-render(<Test />, document.getElementById('react-container'));
+render(
+ <StrictMode>
+ <Test />
+ </StrictMode>,
+ document.getElementById('react-... |
7d4573273ceb0f31f24467c757cbdf82f4029ac6 | src/js/components/PageNotFoundComponent.jsx | src/js/components/PageNotFoundComponent.jsx | var React = require("react/addons");
var PageNotFoundComponent = React.createClass({
displayName: "PageNotFoundComponent",
contextTypes: {
router: React.PropTypes.func
},
render: function () {
var path = this.context.router.getCurrentPath();
var message = `The requested page does not exist: ${pat... | var React = require("react/addons");
var PageNotFoundComponent = React.createClass({
displayName: "PageNotFoundComponent",
contextTypes: {
router: React.PropTypes.func
},
render: function () {
var path = this.context.router.getCurrentPath();
var message = `The requested page does not exist: ${pat... | Drop yellow and use gray for 404 msg | Drop yellow and use gray for 404 msg
| JSX | apache-2.0 | mesosphere/marathon-ui,yp-engineering/marathon-ui,watonyweng/marathon-ui,watonyweng/marathon-ui,yp-engineering/marathon-ui,mesosphere/marathon-ui,Raffo/marathon-ui,cribalik/marathon-ui,cribalik/marathon-ui,janisz/marathon-ui,Raffo/marathon-ui,janisz/marathon-ui | ---
+++
@@ -14,7 +14,7 @@
<div className="centered-content">
<div>
<h3 className="h3">Page Not Found</h3>
- <p className="text-warning">{message}</p>
+ <p className="text-muted">{message}</p>
</div>
</div>
); |
16390e2d0a8bc85e215ca807d292711e42845c17 | imports/ui/structure-view/element-tree/children.jsx | imports/ui/structure-view/element-tree/children.jsx | import React, { PropTypes } from 'react';
import Elements from '../../../api/elements/elements.js';
import Element from './element.jsx';
const subElementsListStyle = {
marginBottom: '0px',
paddingLeft: '20px',
};
const getChildren = (childIds) => {
return Elements.collection.find({ _id: { $in: childIds } }).fet... | import React, { PropTypes } from 'react';
import Elements from '../../../api/elements/elements.js';
import Element from './element.jsx';
const getChildren = (childIds) => {
return Elements.collection.find({ _id: { $in: childIds } }).fetch();
};
const Children = (props) => {
if (!props.childrenVisible) {
retur... | Move css styling right into component | Move css styling right into component
| JSX | mit | minden/data-furnace,minden/data-furnace | ---
+++
@@ -1,11 +1,6 @@
import React, { PropTypes } from 'react';
import Elements from '../../../api/elements/elements.js';
import Element from './element.jsx';
-
-const subElementsListStyle = {
- marginBottom: '0px',
- paddingLeft: '20px',
-};
const getChildren = (childIds) => {
return Elements.collectio... |
8f23411916cce6a38cbf40736f634fe76911d125 | frontend/src/containers/UnrestrictedArea.jsx | frontend/src/containers/UnrestrictedArea.jsx | import React from 'react'
import { connect } from 'react-redux'
const RestrictedArea = React.createClass({
render() {
return (
<div>Unrestricted Area</div>
)
}
})
export default connect(state => state)(RestrictedArea)
| import React from 'react'
import { connect } from 'react-redux'
import * as actions from '../actions/unrestricted_area'
import ExpandableForm from '../components/ExpandableForm'
const RestrictedArea = React.createClass({
handleFormLogin(...credentials) {
this.props.dispatch(actions.loginQuery(...credentia... | Add logic to handle login and registration within unrestricted area container | Add logic to handle login and registration within unrestricted area container
| JSX | mit | 14Plumes/Hexode,KtorZ/Hexode,KtorZ/Hexode,KtorZ/Hexode,14Plumes/Hexode,14Plumes/Hexode | ---
+++
@@ -1,12 +1,36 @@
import React from 'react'
import { connect } from 'react-redux'
+import * as actions from '../actions/unrestricted_area'
+import ExpandableForm from '../components/ExpandableForm'
+
const RestrictedArea = React.createClass({
+ handleFormLogin(...credentials) {
+ this.props.dis... |
0290884a524e0e9b38b855cdf6ff4f4d6842cd2d | livedoc-ui/src/components/doc/nav/NavPanel.jsx | livedoc-ui/src/components/doc/nav/NavPanel.jsx | // @flow
import * as React from 'react';
import { PanelGroup } from 'react-bootstrap';
import type { Livedoc } from '../../../model/livedoc';
import { NavSection } from './NavSection';
import { connect } from 'react-redux';
import type { State } from '../../../model/state';
import { actions } from '../../../redux/reduc... | // @flow
import * as React from 'react';
import { PanelGroup } from 'react-bootstrap';
import type { Livedoc } from '../../../model/livedoc';
import { NavSection } from './NavSection';
import { connect } from 'react-redux';
import type { State } from '../../../model/state';
import { actions } from '../../../redux/reduc... | Make nav panel an accordion to save vertical space | Make nav panel an accordion to save vertical space
| JSX | mit | joffrey-bion/livedoc,joffrey-bion/livedoc,joffrey-bion/livedoc,joffrey-bion/livedoc,joffrey-bion/livedoc | ---
+++
@@ -13,7 +13,7 @@
}
const NavPanel = ({livedoc, onSelect}: Props) => {
- return <PanelGroup role='navigation'>
+ return <PanelGroup role='navigation' accordion>
<NavSection title={'APIs'} elementsByGroupName={livedoc.apis} onSelect={onSelect}/>
<NavSection title={'Types'} elementsByGroupName={... |
b08f4144d53c993ac5b21c4ca64d161f36d63e5b | apps/public/src/components/Markdown/Markdown.jsx | apps/public/src/components/Markdown/Markdown.jsx | import React from 'react';
import PropTypes from 'prop-types';
import BaseMarkdown from 'markdown-to-jsx';
import { Typography } from '@material-ui/core';
const overrides = {
h1: {
component: Typography,
props: {
variant: 'h5',
component: 'h2',
gutterBottom: true
}
},
h2: {
comp... | import React from 'react';
import PropTypes from 'prop-types';
import BaseMarkdown from 'markdown-to-jsx';
import { Typography } from '@material-ui/core';
const overrides = {
h1: {
component: Typography,
props: {
variant: 'h5',
component: 'h2',
gutterBottom: true
}
},
h2: {
comp... | Fix overflowX on <pre> mapper | Fix overflowX on <pre> mapper
| JSX | mit | tumido/malenovska,tumido/malenovska | ---
+++
@@ -48,7 +48,7 @@
variant: 'body1',
component: 'pre',
fontFamily: 'Monospace',
- style: { marginLeft: '2em', marginBottom: '2em' }
+ style: { marginLeft: '2em', marginBottom: '2em', overflowX: 'auto' }
}
}
}; |
e0fdebc981fd581105d85493b4d81ddbf3af974b | src/routes.jsx | src/routes.jsx | import React from 'react';
import { Router, Route, IndexRoute, browserHistory } from 'react-router';
import Main from 'Main';
import Forecast from 'Forecast';
import Windspeed from 'Windspeed';
import Humidity from 'Humidity';
import Averages from 'Averages';
export const routes = (
<Router history={browserHistory}... | import React from 'react';
import { Router, Route, IndexRedirect, browserHistory } from 'react-router';
import Main from 'Main';
import Forecast from 'Forecast';
import Windspeed from 'Windspeed';
import Humidity from 'Humidity';
import Averages from 'Averages';
export const routes = (
<Router history={browserHisto... | Switch index route to an index redirect | Switch index route to an index redirect
| JSX | mit | JavierPDev/Weather-D3,JavierPDev/Weather-D3 | ---
+++
@@ -1,5 +1,5 @@
import React from 'react';
-import { Router, Route, IndexRoute, browserHistory } from 'react-router';
+import { Router, Route, IndexRedirect, browserHistory } from 'react-router';
import Main from 'Main';
import Forecast from 'Forecast';
@@ -10,7 +10,7 @@
export const routes = (
<Rout... |
94b3a3cc1aedbbc6f2d83c3da1ff6ad2433db65b | src/components/game/hud/index.jsx | src/components/game/hud/index.jsx | import React from 'react';
import './index.styl';
import Chat from '../chat';
import Portrait from '../portrait';
import Quests from '../quests';
import session from '../../wowser/session';
class HUD extends React.Component {
render() {
const player = session.player;
return (
<hud className="hud">
... | import React from 'react';
import './index.styl';
// TODO: import Chat from '../chat';
import Portrait from '../portrait';
// TODO: import Quests from '../quests';
import session from '../../wowser/session';
class HUD extends React.Component {
render() {
const player = session.player;
return (
<hud ... | Drop chat and quests panel for now | Drop chat and quests panel for now
| JSX | mit | timkurvers/wowser,wowserhq/wowser,wowserhq/wowser,timkurvers/wowser | ---
+++
@@ -2,9 +2,9 @@
import './index.styl';
-import Chat from '../chat';
+// TODO: import Chat from '../chat';
import Portrait from '../portrait';
-import Quests from '../quests';
+// TODO: import Quests from '../quests';
import session from '../../wowser/session';
class HUD extends React.Component {
@@ ... |
81838bf079d8cfa3f61e0e3d20092f566d57cbc4 | src/client/scripts/containers/addButton.jsx | src/client/scripts/containers/addButton.jsx | // TODO: refactor buttons into containers
// TODO: refactor itinerary and POIDetails into presentational components
// FIX ME: these buttons break on any of their this.props calls
export function addButton(selectedDetails, itinerary) {
return (
<button
className="btn btn-primary"
onClick={() =>
... | import React, { Component } from 'react';
import { connect } from 'react-redux';
import * as AddToItinerary from '../actions/add_to_itinerary_action';
const mapStateToProps = state =>
({
itinerary: state.itinerary,
currentLocation: state.currentLocation,
});
const mapDispatchToProps = dispatch =>
({
... | Add Button container logic completed | Add Button container logic completed
| JSX | mit | theredspoon/trip-raptor,Tropical-Raptor/trip-raptor | ---
+++
@@ -1,18 +1,47 @@
-// TODO: refactor buttons into containers
-// TODO: refactor itinerary and POIDetails into presentational components
+import React, { Component } from 'react';
+import { connect } from 'react-redux';
+import * as AddToItinerary from '../actions/add_to_itinerary_action';
-// FIX ME: these ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.