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 |
|---|---|---|---|---|---|---|---|---|---|---|
d7b80771c193c17d50e7c42a7ef61514dd41ab4d | src/components/multiplication-table.jsx | src/components/multiplication-table.jsx | import React from 'react';
import findPrimes from '../helpers/find-primes.js';
const primes = findPrimes(this.state.totalPrimes);
const tableRows = primes.map((prime1) => {
const tableCells = primes.map((prime2) => {
const product = prime1 * prime2;
class MultiplicationTable extends React.Component {
re... | import React from 'react';
import findPrimes from '../helpers/find-primes.js';
class MultiplicationTable extends React.Component {
constructor(props) {
super(props);
let primesLength = 10;
let primes = findPrimes(primesLength);
this.state = {
primesLength,
pr... | Implement basic default prime multiplication table | Implement basic default prime multiplication table
Prints products for the first 10 primes. Tests :white_check_mark:
| JSX | cc0-1.0 | acusti/primal-multiplication,acusti/primal-multiplication | ---
+++
@@ -1,34 +1,47 @@
import React from 'react';
import findPrimes from '../helpers/find-primes.js';
- const primes = findPrimes(this.state.totalPrimes);
- const tableRows = primes.map((prime1) => {
- const tableCells = primes.map((prime2) => {
- const product = prime1 * prime2;
class MultiplicationTa... |
914e1e1d44168ea0d012bab6059032839830291a | src/fetch-on-update.jsx | src/fetch-on-update.jsx | import React, { Component } from "react";
import { get, set } from "lodash";
import shallowEqual from "shallowequal";
export default function fetchOnUpdate(fn, ...keys) {
return DecoratedComponent => class FetchOnUpdateDecorator extends Component {
componentWillMount() {
fn(this.props);
}
componentDidUpdate... | import React, { Component } from "react";
import { get } from "lodash";
import shallowEqual from "shallowequal";
export default function fetchOnUpdate(fn, ...keys) {
return DecoratedComponent => class FetchOnUpdateDecorator extends Component {
componentWillMount() {
fn(this.props);
}
componentDidUpdate (pre... | Use reduce instead of lodash.set | Use reduce instead of lodash.set
| JSX | mit | civicsource/redux-rsi | ---
+++
@@ -1,5 +1,5 @@
import React, { Component } from "react";
-import { get, set } from "lodash";
+import { get } from "lodash";
import shallowEqual from "shallowequal";
export default function fetchOnUpdate(fn, ...keys) {
@@ -26,17 +26,16 @@
function mapParams (paramKeys, params) {
if (paramKeys.length <... |
21fe0ce1161e23df8a2eec7e0aff0a6c399fb0d3 | app/scripts/about/components/about.jsx | app/scripts/about/components/about.jsx | 'use babel';
import React from 'react';
export default class About extends React.Component {
constructor(props, context) {
super(props, context);
}
render() {
return (
<div>
<h1 className="title">Build Checker App</h1>
<br />
<br />
<p>Versão: 0.0.1</p>
</di... | 'use babel';
import React from 'react';
export default class About extends React.Component {
constructor(props, context) {
super(props, context);
}
render() {
return (
<div>
<h1 className="title">Build Checker App</h1>
<br />
<br />
<p>Versão: 0.0.2</p>
</di... | Add new version number in About component | Add new version number in About component
| JSX | mit | willmendesneto/build-checker-app,willmendesneto/build-checker-app | ---
+++
@@ -14,7 +14,7 @@
<h1 className="title">Build Checker App</h1>
<br />
<br />
- <p>Versão: 0.0.1</p>
+ <p>Versão: 0.0.2</p>
</div>
)
} |
372e8ec54d10ec2f905b19a0c9e27af761f42d00 | src/animations/FadeInOut/index.jsx | src/animations/FadeInOut/index.jsx | import React from 'react';
import { bool, node, number, string } from 'prop-types';
import { Transition } from 'react-transition-group';
import { defaultAnimationProps, getInlineStyles } from 'utilities';
const statusStyles = {
entered: {
opacity: 1,
},
entering: {
opacity: 0,
},
e... | import React from 'react';
import { bool, node, number, string } from 'prop-types';
import { Transition } from 'react-transition-group';
import { defaultAnimationProps, getInlineStyles } from 'utilities';
const statusStyles = {
entered: {
opacity: 1,
},
entering: {
opacity: 0,
},
e... | Fix status opacity for exiting | fix(FadeInOut): Fix status opacity for exiting
Opacity should be 0 for all statuses except entered
| JSX | mit | unruffledBeaver/react-animation-components | ---
+++
@@ -15,7 +15,7 @@
opacity: 0,
},
exiting: {
- opacity: 1,
+ opacity: 0,
},
};
|
334b626baf8d93b3f32991e7d84f5869972ea13d | src/index.jsx | src/index.jsx | import buildParts from './build_parts'
import React from 'react'
function GTMParts (args) {
const parts = buildParts(args);
function noScriptAsReact() {
return <noscript dangerouslySetInnerHTML = {{ __html: parts.iframe }} ></noscript>
}
function noScriptAsHTML() {
return `<noscript... | import buildParts from './build_parts';
import React from 'react';
function GTMParts(args) {
const parts = buildParts(args);
function noScriptAsReact() {
return <noscript dangerouslySetInnerHTML={{ __html: parts.iframe }}></noscript>;
}
function noScriptAsHTML() {
return `<noscript>${... | Fix problems reported by eslint | Fix problems reported by eslint
| JSX | mit | holidaycheck/react-google-tag-manager | ---
+++
@@ -1,12 +1,11 @@
-import buildParts from './build_parts'
-import React from 'react'
+import buildParts from './build_parts';
+import React from 'react';
-function GTMParts (args) {
-
- const parts = buildParts(args);
+function GTMParts(args) {
+ const parts = buildParts(args);
function noScri... |
2510b36d8c58ea81dceb850d81c67f1cd8b6d374 | src/pages/events.jsx | src/pages/events.jsx | import { css } from 'glamor';
import Paper from 'material-ui/Paper';
import moment from 'moment';
import React from 'react';
import BigCalendar from 'react-big-calendar';
import 'react-big-calendar/lib/css/react-big-calendar.css';
import Helmet from 'react-helmet';
import ArticleContainer from '../components/article-co... | import { css } from 'glamor';
import Paper from 'material-ui/Paper';
import moment from 'moment';
import React from 'react';
import BigCalendar from 'react-big-calendar';
import 'react-big-calendar/lib/css/react-big-calendar.css';
import Helmet from 'react-helmet';
import ArticleContainer from '../components/article-co... | Improve date storage format for the Events page | Improve date storage format for the Events page
| JSX | mit | simonyiszk/mvk-web,simonyiszk/mvk-web | ---
+++
@@ -10,7 +10,7 @@
BigCalendar.momentLocalizer(moment);
-const Events = () => {
+const EventsPage = () => {
const title = 'Eseménynaptár';
return (
@@ -32,8 +32,8 @@
events={[
{
title: 'III. MVK Versenycsapat Konferencia',
- start: new Da... |
c128ab5f167731c8631427d57d4d807e35de5577 | web/static/js/components/stage_change_info_idea_generation.jsx | web/static/js/components/stage_change_info_idea_generation.jsx | import React from "react"
export default () => (
<div>
The skinny on Idea Generation:
<div className="ui basic segment">
<ul className="ui list">
<li>Reflect on the events of this past sprint.</li>
<li>Submit items that made you happy, sad, or just plain confused.</li>
<li>
... | import React from "react"
export default () => (
<div>
The skinny on Idea Generation:
<div className="ui basic segment">
<ul className="ui list">
<li>Reflect on the events of this past sprint.</li>
<li>Submit items that made you happy, sad, or just plain confused.</li>
<li>Assum... | Update Idea Generation intro copy | Update Idea Generation intro copy
| JSX | mit | stride-nyc/remote_retro,stride-nyc/remote_retro,stride-nyc/remote_retro | ---
+++
@@ -7,10 +7,7 @@
<ul className="ui list">
<li>Reflect on the events of this past sprint.</li>
<li>Submit items that made you happy, sad, or just plain confused.</li>
- <li>
- Don't throw anyone under the bus.
- If a disaster occurred, leave the names at the do... |
ce8218cb3dbc691563f5bc788705c19d549b568c | src/form.jsx | src/form.jsx | var React = require("react");
var Store = require("./store.js");
var Form = React.createClass({
getInitialState: function() {
return {
url: ""
};
},
handleSubmit: function(e) {
e.preventDefault();
if (this.state.url == "") {
return;
}
if (!this.state.url.match("^http.+/wishli... | var React = require("react");
var Store = require("./store.js");
var Form = React.createClass({
getInitialState: function() {
return {
url: ""
};
},
handleSubmit: function(e) {
e.preventDefault();
if (this.state.url == "") {
return;
}
if (!this.state.url.match("^http.+/wishli... | Add example of wishlist's URL | Add example of wishlist's URL
| JSX | mit | Sixeight/iwai,Sixeight/iwai,Sixeight/iwai | ---
+++
@@ -33,7 +33,7 @@
return (
<form onSubmit={this.handleSubmit}>
<div className="form-group">
- <input type="url" onChange={this.handleChange} className="form-control" value={this.state.url} placeholder="ほしいものリストのURL" />
+ <input type="url" onChange={this.handleChange} cla... |
d70162f1b508c5b47cb914290050313da90a6f9c | src/AppBundle/Resources/assets/react/reducers/report_reducer.jsx | src/AppBundle/Resources/assets/react/reducers/report_reducer.jsx | /* global opg: true */
import { NO_TRANSFERS } from '../actions/report_actions';
import update from 'react-addons-update';
export default function(state = opg.report, action) {
switch (action.type){
case NO_TRANSFERS:
return update(state, {
noTransfers: { $set: action.payload }
});
... | /* global opg: true */
import { NO_TRANSFERS } from '../actions/report_actions';
import { GET_TRANSFERS } from '../actions/transfer_actions';
import update from 'react-addons-update';
export default function(state = opg.report, action) {
switch (action.type){
case GET_TRANSFERS:
if (action.payload.has... | Add support for no transfers in get transfers | Add support for no transfers in get transfers
| JSX | mit | ministryofjustice/opg-digi-deps-client,ministryofjustice/opg-digi-deps-client,ministryofjustice/opg-digi-deps-client,ministryofjustice/opg-digi-deps-client | ---
+++
@@ -1,9 +1,19 @@
/* global opg: true */
import { NO_TRANSFERS } from '../actions/report_actions';
+import { GET_TRANSFERS } from '../actions/transfer_actions';
+
import update from 'react-addons-update';
export default function(state = opg.report, action) {
switch (action.type){
+ case GET_TRANS... |
b40cbbbbb10e6e57a918f8bf55092b653305f513 | examples/index.jsx | examples/index.jsx | import React from 'react';
import ReactDOM from 'react-dom';
import Datamap from '../src';
const App = React.createClass({ // eslint-disable-line react/prefer-es6-class
displayName: 'App',
getInitialState() {
return {
height: 300,
scope: 'world',
width: 500
};
},
handleUpdate() {
this.setState(O... | import React from 'react';
import ReactDOM from 'react-dom';
import Datamap from '../src';
class App extends React.Component {
state = {
height: 300,
scope: 'world',
width: 500
};
handleUpdate = () => {
this.setState(Object.assign({}, {
height: parseInt(this.refs.height.value, 10) || null,
scope: t... | Convert example to ES6 class | Convert example to ES6 class
| JSX | mit | btmills/react-datamaps | ---
+++
@@ -3,25 +3,21 @@
import Datamap from '../src';
-const App = React.createClass({ // eslint-disable-line react/prefer-es6-class
+class App extends React.Component {
- displayName: 'App',
+ state = {
+ height: 300,
+ scope: 'world',
+ width: 500
+ };
- getInitialState() {
- return {
- height: 300... |
5e545497b57abd8c9d4916e4153d870e474faea5 | src/components/util/hydra_aware.jsx | src/components/util/hydra_aware.jsx | "use strict";
var React = require('react')
, Immutable = require('immutable')
module.exports = function makeHydraLinkAware(Component) {
var HydraAwareComponent = React.createClass({
propTypes: {
data: React.PropTypes.instanceOf(Immutable.Map)
},
hasHydraOperation(type) {
var { data } = th... | "use strict";
var React = require('react')
, Immutable = require('immutable')
module.exports = function makeHydraLinkAware(Component) {
var HydraAwareComponent = React.createClass({
propTypes: {
data: React.PropTypes.instanceOf(Immutable.Map)
},
hasHydraOperation(type) {
var { data } = th... | Add fallback if a hydra-aware resource has no operations | Add fallback if a hydra-aware resource has no operations
| JSX | agpl-3.0 | editorsnotes/editorsnotes-renderer | ---
+++
@@ -13,7 +13,7 @@
var { data } = this.props
return data
- .get('hydra:operation')
+ .get('hydra:operation', Immutable.List())
.some(operation => (
operation.get('@type') === `hydra:${type}ResourceOperation`))
}, |
c46169318119ab787f55a1e13a646652e5db2057 | app/layout/Layout.jsx | app/layout/Layout.jsx | import React from 'react'
import Header from './Header.jsx'
let Layout = React.createClass({
render: function(){
return (
<div>
<Header />
<div id="main" role="main">
{this.props.children}
</div>
</div>
)
... | import React from 'react'
import Header from './Header.jsx'
import Menu from './Menu.jsx'
let Layout = React.createClass({
render: function(){
return (
<div>
<Menu />
<div id="main" role="main">
{this.props.children}
</div>
... | Use menu instead of header | Use menu instead of header
| JSX | agpl-3.0 | mbrossard/go-experiments,mbrossard/go-experiments,mbrossard/go-experiments | ---
+++
@@ -1,11 +1,12 @@
import React from 'react'
import Header from './Header.jsx'
+import Menu from './Menu.jsx'
let Layout = React.createClass({
render: function(){
return (
<div>
- <Header />
+ <Menu />
<div id="main" role="main">
... |
dbc6ded131c7c6e46f2fe54a51f4be531e860e0d | app/js/Grouping.jsx | app/js/Grouping.jsx | var React = require('react')
var GroupingContainer = require('./GroupingContainer.jsx')
var Grouping = React.createClass({
getInitialState: function() {
return {data: []}
},
getLegend: function() {
if(this.props.options.legend) {
var options = this.props.options.legend.map(funct... | var React = require('react')
var GroupingContainer = require('./GroupingContainer.jsx')
var Grouping = React.createClass({
getInitialState: function() {
return {data: []}
},
getLegend: function() {
if(this.props.options.legend) {
var options = this.props.options.legend.map(funct... | Use a horizontal rule for all grouping headers. | Use a horizontal rule for all grouping headers.
| JSX | apache-2.0 | nuclearfurnace/oscilloscope,nuclearfurnace/oscilloscope,nuclearfurnace/oscilloscope | ---
+++
@@ -27,6 +27,7 @@
return (
<div className="group">
<h3>{this.props.options.displayName}</h3>
+ <hr />
{legend}
|
939886e44fa1756f4e70a5ed0fdaf9d5af8c70bf | app/assets/javascripts/components/high_order/conditional.jsx | app/assets/javascripts/components/high_order/conditional.jsx | import React from 'react';
import createReactClass from 'create-react-class';
import PropTypes from 'prop-types';
// Enables DRY and simple conditional components
// Renders items when 'show' prop is undefined
const Conditional = function (Component) {
return createReactClass({
propTypes: {
show: PropType... | import React from 'react';
import createReactClass from 'create-react-class';
import PropTypes from 'prop-types';
// Enables DRY and simple conditional components
// Renders items when 'show' prop is undefined
const Conditional = function (Component) {
return createReactClass({
displayName: `Conditional${Compon... | Add displayName for Conditional HOC | Add displayName for Conditional HOC
| JSX | mit | alpha721/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,sejalkhatri/WikiEduDashboard,sejalkhatri/WikiEduDashboard,alpha721/WikiEduDashboard,sejalkhatri/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,sejalkhatri/WikiEduDashboard,sejalkhatri/WikiEduDashboard,... | ---
+++
@@ -7,6 +7,8 @@
const Conditional = function (Component) {
return createReactClass({
+ displayName: `Conditional${Component.displayName}`,
+
propTypes: {
show: PropTypes.bool
}, |
246fb85a87e2fc7728ca9c91a4d95ffac76bd89f | client/components/Challenge.jsx | client/components/Challenge.jsx | import React from 'react';
require('./../../public/main.css');
class Challenge extends React.Component {
constructor(props) {
super(props);
this.state = {};
}
render() {
return (
<div>
<strong><p> Challenge Text </p></strong>
<div dangerouslySetInnerHTML={{__html: this.props.ch... | import React from 'react';
require('./../../public/main.css');
class Challenge extends React.Component {
constructor(props) {
super(props);
this.state = {splitText: "bullshit"};
this.updateChallenge = this.updateChallenge.bind(this);
// this.splitChallengeText = this.splitChallengeText.bind(this);
... | Add extra methods to challenge and update state | Add extra methods to challenge and update state
| JSX | mit | OrderlyPhoenix/OrderlyPhoenix,OrderlyPhoenix/OrderlyPhoenix | ---
+++
@@ -4,13 +4,37 @@
class Challenge extends React.Component {
constructor(props) {
super(props);
- this.state = {};
+ this.state = {splitText: "bullshit"};
+ this.updateChallenge = this.updateChallenge.bind(this);
+ // this.splitChallengeText = this.splitChallengeText.bind(this);
+ // th... |
bdb1a3fd50e69ac670cc89eaea9838e8cd5c4acd | src/client/apps/player/components.jsx | src/client/apps/player/components.jsx | import React from 'react';
import YouTube from 'react-youtube';
import store from '../root/store.js';
export default class VideoPlayer extends React.Component {
constructor(props) {
super(props);
// Set initial video as a demo
const videoId = store.getState().player.videoId;
this.state = {
pla... | import React from 'react';
import YouTube from 'react-youtube';
import store from '../root/store.js';
export default class VideoPlayer extends React.Component {
constructor(props) {
super(props);
// Set initial video as a demo
const videoId = store.getState().player.videoId;
this.state = {
pla... | Fix 'always play' bug when using player | Fix 'always play' bug when using player
| JSX | mit | agustin380/youtube-playlists,agustin380/youtube-playlists | ---
+++
@@ -16,7 +16,7 @@
// Bind callback methods to make `this` the correct context.
this.handleSetVideo = this.handleSetVideo.bind(this);
this.loadPlayer = this.loadPlayer.bind(this);
- this.playVideo = this.playVideo.bind(this);
+ this.onStateChange = this.onStateChange.bind(this);
}
co... |
84070f7a375f9c82b6c0c3f0e4ee1f3c4efa5768 | src/renderer/application.jsx | src/renderer/application.jsx | import React from 'react'
export default class Application extends React.Component {
render() {
return (
<h1>Hello world</h1>
)
}
}
| import React from 'react'
/**
* Main Application component
*
* @return {Node}
*/
export default function Application() {
return (
<h1>Hello world!</h1>
)
}
| Rewrite Application as pure component | Rewrite Application as pure component
Whatever that actually means...
| JSX | bsd-3-clause | Alaneor/electron-playground,Alaneor/electron-playground,Alaneor/electron-playground | ---
+++
@@ -1,9 +1,12 @@
import React from 'react'
-export default class Application extends React.Component {
- render() {
- return (
- <h1>Hello world</h1>
- )
- }
+/**
+ * Main Application component
+ *
+ * @return {Node}
+ */
+export default function Application() {
+ return (
+ <h1>Hello wor... |
fb0ef9473463d12b9a43809331529b235b5d90c6 | static/app/components/MessageList.jsx | static/app/components/MessageList.jsx | import React from 'react';
import Message from './Message';
export default function(props) {
return <div>{props.messages.map(createMessage)}</div>;
function createMessage(message) {
return (
<Message
key={message.uuid}
message={message}
onDelete={props.onDelete}
/>
);
... | import React from 'react';
import Message from './Message';
export default React.createClass({
render: function() {
return <div>{this.props.messages.map(createMessage, this)}</div>;
function createMessage(message) {
return (
<Message
key={message.uuid}
message={message}
... | Revert to React.createClass style for testing purposes | Revert to React.createClass style for testing purposes
| JSX | mit | matthewlane/mesa,matthewlane/mesa,matthewlane/mesa,matthewlane/mesa | ---
+++
@@ -1,15 +1,17 @@
import React from 'react';
import Message from './Message';
-export default function(props) {
- return <div>{props.messages.map(createMessage)}</div>;
- function createMessage(message) {
- return (
- <Message
- key={message.uuid}
- message={message}
- onDel... |
9622d8a2f1cc896452f0bf4c4dadf957651e00ce | views/components/tasks/TasksList.jsx | views/components/tasks/TasksList.jsx | import React, { Component } from 'react';
import { Link } from 'react-router'
export default class TasksList extends Component {
render() {
return (
<div>
<h2>{this.props.activeWorkspace.name}</h2>
<ul>
{this.props.activeWorkspace.tasks.map(ta... | import React, { Component } from 'react';
import { Link } from 'react-router'
export default class TasksList extends Component {
render() {
return (
<div>
<h2>{this.props.activeWorkspace.name}</h2>
<ul>
{this.props.activeWorkspace.tasks.map(ta... | Add correct path to task link | Add correct path to task link
| JSX | mit | paasbox/paasbox,paasbox/paasbox | ---
+++
@@ -8,7 +8,7 @@
<h2>{this.props.activeWorkspace.name}</h2>
<ul>
{this.props.activeWorkspace.tasks.map(task => {
- return <li key={task.id}><Link to={`/` + task.id}> {task.id} </Link></li>;
+ return <li key={ta... |
586d5504991e7077eedbc3aa620926f091060778 | src/components/AddServiceTile.jsx | src/components/AddServiceTile.jsx | /* global cozy */
import React, { Component } from 'react'
import Icon from 'cozy-ui/react/Icon'
import palette from 'cozy-ui/stylus/settings/palette.json'
export class AddServiceTile extends Component {
constructor(props) {
super(props)
this.state = {
redirecting: false
}
this.toggleRedirect... | import React, { Component } from 'react'
import { withClient } from 'cozy-client'
import Icon from 'cozy-ui/react/Icon'
import AppLinker, { generateWebLink } from 'cozy-ui/react/AppLinker'
import palette from 'cozy-ui/stylus/settings/palette.json'
export class AddServiceTile extends Component {
render() {
const... | Use a direct link to open the store | feat: Use a direct link to open the store
| JSX | agpl-3.0 | cozy/cozy-home,cozy/cozy-home,cozy/cozy-home | ---
+++
@@ -1,53 +1,38 @@
-/* global cozy */
import React, { Component } from 'react'
+import { withClient } from 'cozy-client'
import Icon from 'cozy-ui/react/Icon'
+import AppLinker, { generateWebLink } from 'cozy-ui/react/AppLinker'
import palette from 'cozy-ui/stylus/settings/palette.json'
export class Ad... |
30003e1c2f1821819cdb1b5ebfb2c9ccdad24219 | src/components/hero.jsx | src/components/hero.jsx | import React, { PropTypes } from 'react';
import Header from 'components/header';
import { NfNLogoVertical } from 'components/logos/nfn-logo-vertical';
import { Celebration } from 'components/celebration';
export const Hero = ({ title, subtitle, credit = '' }) =>
<div className="hero" title={credit}>
<NfNLogoVe... | import React, { PropTypes } from 'react';
import Header from 'components/header';
import { NfNLogoVertical } from 'components/logos/nfn-logo-vertical';
import { Celebration } from 'components/celebration';
export const Hero = ({ credit = '' }) =>
<div className="hero" title={credit}>
<NfNLogoVertical />
<He... | Remove old titles because they overlap with the celebration header | Remove old titles because they overlap with the celebration header
| JSX | apache-2.0 | zooniverse/notes-from-nature-landing,zooniverse/notes-from-nature-landing | ---
+++
@@ -4,13 +4,11 @@
import { Celebration } from 'components/celebration';
-export const Hero = ({ title, subtitle, credit = '' }) =>
+export const Hero = ({ credit = '' }) =>
<div className="hero" title={credit}>
<NfNLogoVertical />
<Header bgClass={'transparent'} />
- <a><Celebration /></a... |
40563f4fc66a39b263b2c25a7a012f3290b99c38 | src/index.jsx | src/index.jsx | import React from 'react'
import ReactDOM from 'react-dom'
import {Provider} from 'react-redux'
import {createStore, compose, applyMiddleware} from 'redux'
import {reducer} from './reducer/index'
import {App} from './components/app'
import './firebase-init'
const middlewares = []
if (process.env.NODE_ENV === 'develop... | import React from 'react'
import ReactDOM from 'react-dom'
import {Provider} from 'react-redux'
import {createStore, compose, applyMiddleware} from 'redux'
import './firebase-init'
import {reducer} from './reducer/index'
import {App} from './components/app'
const middlewares = []
if (process.env.NODE_ENV === 'develop... | Fix firebase not inited error | Fix firebase not inited error
| JSX | mit | jsse-2017-ph23/web-frontend,jsse-2017-ph23/web-frontend,jsse-2017-ph23/web-frontend | ---
+++
@@ -2,9 +2,9 @@
import ReactDOM from 'react-dom'
import {Provider} from 'react-redux'
import {createStore, compose, applyMiddleware} from 'redux'
+import './firebase-init'
import {reducer} from './reducer/index'
import {App} from './components/app'
-import './firebase-init'
const middlewares = []
|
2bc8f9ac87b59f53f04427a4af57d4127154f81f | js/components/tweetList.jsx | js/components/tweetList.jsx | /** @jsx React.DOM */
var TweetList = React.createClass({
getInitialState: function() {
return {
tweetLength: 140,
data: {
tweets: []
}
};
},
componentDidMount: function() {
EventSystem.subscribe('input.text.change', this.updateList);
},
updateList: function(text) {
... | /** @jsx React.DOM */
var TweetList = React.createClass({
getInitialState: function() {
return {
tweetLength: 140,
data: {
tweets: []
}
};
},
componentDidMount: function() {
EventSystem.subscribe('input.text.change', this.updateList);
},
updateList: function(text) {
... | Add tweet button to each tweet text | Add tweet button to each tweet text
| JSX | mit | dburgos/tweet-splitter,dburgos/tweet-splitter | ---
+++
@@ -24,7 +24,7 @@
tweets: tweets
}
});
- })
+ });
},
generateTweets: function(text, callback) {
@@ -47,7 +47,13 @@
return <ul className="tweets">
{
data.tweets.map(function(tweet) {
- return <li key={tweet.id}>{tweet.... |
286bbebd1476cdb627d3e3aa27514feb11113277 | client/src/components/App.jsx | client/src/components/App.jsx | import React from 'react';
import { Switch, Route, Redirect } from 'react-router-dom';
import Header from './Header.jsx';
import Portfolio from './Portfolio.jsx';
import SignUpPage from './SignUp/SignUpPage.jsx';
import LoginPage from './Login/LoginPage.jsx';
import NotFoundPage from './NotFoundPage.jsx';
import Auth ... | import React from 'react';
import { Switch, Route, Redirect } from 'react-router-dom';
import Header from './Header.jsx';
import Portfolio from './Portfolio.jsx';
import SignUpPage from './SignUp/SignUpPage.jsx';
import LoginPage from './Login/LoginPage.jsx';
import NotFoundPage from './NotFoundPage.jsx';
import Auth ... | Remove a left over console.log | Remove a left over console.log
| JSX | mit | kaiguogit/growfolio,kaiguogit/growfolio | ---
+++
@@ -11,7 +11,6 @@
// https://reacttraining.com/react-router/web/example/auth-workflow
const PrivateRoute = ({ component: Component, ...rest }) => {
- console.log(rest);
return (
<Route {...rest} render={props => (
Auth.loggedIn() ? ( |
d1a6c20fd4427b8b3257c42510d4c03b5c28285f | client/javascript/containers/App.jsx | client/javascript/containers/App.jsx | import React from 'react';
import { connect } from 'react-redux';
import { selectDocument, createDocument, changeDocumentTitle } from '../actions/documentList';
import DocumentList from '../components/DocumentList';
import SyncedEditor from '../components/SyncedEditor';
class App extends React.Component {
render() {... | import React from 'react';
import { connect } from 'react-redux';
import { selectDocument, createDocument, changeDocumentTitle } from '../actions/documentList';
import DocumentList from '../components/DocumentList';
import SyncedEditor from '../components/SyncedEditor';
function createWebSocketURL(s = '') {
const l ... | Use windows.location for WebSocket URL | Use windows.location for WebSocket URL
| JSX | bsd-3-clause | zesik/insnota,zesik/insnota | ---
+++
@@ -3,6 +3,11 @@
import { selectDocument, createDocument, changeDocumentTitle } from '../actions/documentList';
import DocumentList from '../components/DocumentList';
import SyncedEditor from '../components/SyncedEditor';
+
+function createWebSocketURL(s = '') {
+ const l = window.location;
+ return ((l.... |
6744ad7a6fec39bde2f002736439f25417416dd6 | client/app/bundles/HelloWorld/components/accounts/new/new_teacher.jsx | client/app/bundles/HelloWorld/components/accounts/new/new_teacher.jsx | 'use strict';
import React from 'react'
import BasicTeacherInfo from './basic_teacher_info'
import EducatorType from './educator_type'
import AnalyticsWrapper from '../../shared/analytics_wrapper'
export default React.createClass({
propTypes: {
signUp: React.PropTypes.func.isRequired,
errors: React.PropType... | 'use strict';
import React from 'react'
import BasicTeacherInfo from './basic_teacher_info'
import EducatorType from './educator_type'
import AnalyticsWrapper from '../../shared/analytics_wrapper'
export default React.createClass({
propTypes: {
signUp: React.PropTypes.func.isRequired,
errors: React.PropType... | Fix newsletter checkbox default state on signup form for teachers | Fix newsletter checkbox default state on signup form for teachers
| 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 | ---
+++
@@ -11,14 +11,15 @@
errors: React.PropTypes.object,
stage: React.PropTypes.number.isRequired,
update: React.PropTypes.func.isRequired,
- textInputGenerator: React.PropTypes.object.isRequired
+ textInputGenerator: React.PropTypes.object.isRequired,
+ sendNewsletter: React.PropTypes.bool... |
247d348162f257d7c5ee240865ff15c67f2b73cf | docs/_shared/PatreonSponsors.jsx | docs/_shared/PatreonSponsors.jsx | import PropTypes from 'prop-types';
import patrons from '../patrons.json';
import React, { Component } from 'react';
import { withStyles, Avatar, List, ListItem, ListItemText } from '@material-ui/core';
class PatreonSponsors extends Component {
static propTypes = {
classes: PropTypes.object.isRequired,
};
r... | import PropTypes from 'prop-types';
import patrons from '../patrons.json';
import React, { Component } from 'react';
import { withStyles, Avatar, List, ListItem, ListItemText } from '@material-ui/core';
class PatreonSponsors extends Component {
static propTypes = {
classes: PropTypes.object.isRequired,
};
r... | Fix alignment of patreon sponsors avatars | Fix alignment of patreon sponsors avatars
| JSX | mit | mui-org/material-ui,oliviertassinari/material-ui,mbrookes/material-ui,mui-org/material-ui,dmtrKovalenko/material-ui-pickers,mbrookes/material-ui,rscnt/material-ui,dmtrKovalenko/material-ui-pickers,callemall/material-ui,mbrookes/material-ui,rscnt/material-ui,callemall/material-ui,rscnt/material-ui,callemall/material-ui,... | ---
+++
@@ -25,7 +25,7 @@
rel="noopenner noreferrer"
>
<ListItem button>
- <Avatar alt={patron.full_name} src={patron.image_url} />
+ <Avatar className={classes.avatar} alt={patron.full_name} src={patron.image_url} />
<ListItemText primary=... |
5901752f2377325a3515b170ac130ee001bfe766 | app/javascript/app/components/download-menu/download-menu-component.jsx | app/javascript/app/components/download-menu/download-menu-component.jsx | import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import SimpleMenu from 'components/simple-menu';
import downloadIcon from 'assets/icons/download.svg';
import ModalDownload from 'components/modal-download';
class DownloadMenu extends PureComponent {
// eslint-disable-line react/prefe... | import React, { PureComponent, Fragment } from 'react';
import PropTypes from 'prop-types';
import SimpleMenu from 'components/simple-menu';
import downloadIcon from 'assets/icons/download.svg';
import ModalDownload from 'components/modal-download';
class DownloadMenu extends PureComponent {
// eslint-disable-line r... | Substitute div for Fragment to avoid UI breacking | Substitute div for Fragment to avoid UI breacking
| JSX | mit | Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch | ---
+++
@@ -1,4 +1,4 @@
-import React, { PureComponent } from 'react';
+import React, { PureComponent, Fragment } from 'react';
import PropTypes from 'prop-types';
import SimpleMenu from 'components/simple-menu';
import downloadIcon from 'assets/icons/download.svg';
@@ -9,7 +9,7 @@
render() {
const { downl... |
a33d7c90968d469d6259ff706b3a10e0344ad251 | imports/ui/main-nav-bar.jsx | imports/ui/main-nav-bar.jsx | import React from 'react';
import { Navbar, Nav, NavItem } from 'react-bootstrap';
export default class MainNavBar extends React.Component {
constructor(props, context) {
super(props, context);
this.isActive = this.isActive.bind(this);
}
isActive(view) {
return this.context.router.isActive(view);
... | import React from 'react';
import { Navbar, Nav, NavItem } from 'react-bootstrap';
export default class MainNavBar extends React.Component {
constructor(props, context) {
super(props, context);
this.isActive = this.isActive.bind(this);
}
isActive(view) {
return this.context.router.isActive(view);
... | Add scale icon to measure view link in nav bar | Add scale icon to measure view link in nav bar
| JSX | mit | minden/data-furnace,minden/data-furnace | ---
+++
@@ -36,6 +36,7 @@
active={this.isActive('measure-view')}
onClick={() => this.goTo('/measure-view')}
>
+ <i className="fa fa-balance-scale"></i>
Measure View
</NavItem>
</Nav> |
7ce02b3c7545ed14edc3d0ee309492a0e8e04486 | client/app/bundles/course/user-notification/components/AchievementGainedPopup.jsx | client/app/bundles/course/user-notification/components/AchievementGainedPopup.jsx | import React from 'react';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl, intlShape } from 'react-intl';
import Popup from 'course/user-notification/components/Popup';
const styles = {
badge: {
maxHeight: 250,
maxWidth: 250,
},
title: {
marginTop: 30,
marginBottom: 10,
... | import React from 'react';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl, intlShape } from 'react-intl';
import Popup from 'course/user-notification/components/Popup';
const styles = {
badge: {
maxHeight: 250,
maxWidth: 250,
},
title: {
marginTop: 30,
marginBottom: 10,
... | Allow HTML descriptions in user popup notifications | Allow HTML descriptions in user popup notifications
| JSX | mit | Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,cysjonathan/coursemology2,Coursemology/coursemology2,cysjonathan/coursemology2,Coursemology/coursemology2,cysjonathan/coursemology2 | ---
+++
@@ -38,9 +38,10 @@
<span style={styles.title}>
{ notification.title }
</span>
- <span style={styles.description}>
- { notification.description }
- </span>
+ <span
+ style={styles.description}
+ dangerouslySetInnerHTML={{ __html: notification.description }}
+ />
<... |
4c20493031f1353587491597f22a8639a736d170 | src/components/ArticleListView.jsx | src/components/ArticleListView.jsx | import React from 'react';
import ArticlePreview from 'components/ArticlePreview';
export default class ArticleListView extends React.Component {
getInitialState() {
//getState()
}
componentDidMount() {
//subscribes to store
}
componentWillUnmount() {
//unsubscribes from store
}
onChange(s... | import React from 'react';
import ArticlePreview from 'components/ArticlePreview';
export default class ArticleListView extends React.Component {
getInitialState() {
//getState()
}
componentDidMount() {
//subscribes to store
}
componentWillUnmount() {
//unsubscribes from store
}
onChange(s... | Fix misnamed prop passed to ArticlePreview | Fix misnamed prop passed to ArticlePreview
| JSX | mit | thegazelle-ad/gazelle-server,thegazelle-ad/gazelle-front-end,thegazelle-ad/gazelle-front-end,thegazelle-ad/gazelle-server,thegazelle-ad/gazelle-server,thegazelle-ad/gazelle-server,thegazelle-ad/gazelle-server | ---
+++
@@ -25,7 +25,7 @@
// TODO: establish featured article, editor's picks, and trending sections
var articles = this.state.articles.map(function(article){
return (
- <ArticlePreview key={article.id} post={article} />
+ <ArticlePreview key={article.id} article={article} />
);
... |
d2a3143fd1dd418c4abdf7975dfe99fd97126d6e | src/components/notify-settings.jsx | src/components/notify-settings.jsx | import * as React from 'react'
function isSupported() {
return window.PushManager && navigator.serviceWorker && Notification
}
export class NotifySettings extends React.PureComponent {
constructor() {
super(...arguments)
this.state = {
supported: isSupported(),
permission: Notification.permiss... | import * as React from 'react'
import * as firebase from 'firebase/app'
const messaging = firebase.messaging()
function isSupported() {
return window.PushManager && navigator.serviceWorker && Notification
}
export class NotifySettings extends React.PureComponent {
constructor() {
super(...arguments)
this.... | Use firebase for setting up notification | Use firebase for setting up notification
| JSX | mit | jsse-2017-ph23/web-frontend,jsse-2017-ph23/web-frontend,jsse-2017-ph23/web-frontend | ---
+++
@@ -1,4 +1,6 @@
import * as React from 'react'
+import * as firebase from 'firebase/app'
+const messaging = firebase.messaging()
function isSupported() {
return window.PushManager && navigator.serviceWorker && Notification
@@ -9,19 +11,27 @@
super(...arguments)
this.state = {
supported... |
8570cf41eb61f9caae0093ec3c387847a7ec5a86 | src/scripts/components/FramedEditor.jsx | src/scripts/components/FramedEditor.jsx | /*eslint-disable vars-on-top */
require('babel-core/polyfill');
var Frame = require('react-frame-component');
var React = require('react');
var Editor = require('./Editor');
// Inject style manually in the IFrame (don't use style-loader).
var style = require('!css-loader!less-loader!../../styles/main-framed.less')... | /*eslint-disable vars-on-top */
require('babel-polyfill');
var Frame = require('react-frame-component');
var React = require('react');
var Editor = require('./Editor');
// Inject style manually in the IFrame (don't use style-loader).
var style = require('!css-loader!less-loader!../../styles/main-framed.less');
v... | Fix babel-polyfill reference in framed editor | Fix babel-polyfill reference in framed editor
| JSX | mit | lumc-nested/nested-editor,lumc-nested/nested-editor | ---
+++
@@ -1,5 +1,5 @@
/*eslint-disable vars-on-top */
-require('babel-core/polyfill');
+require('babel-polyfill');
var Frame = require('react-frame-component'); |
47e8dfe9c41bd0a5975fc50ad8c6c818b16b2743 | src/components/Game.jsx | src/components/Game.jsx | import React from 'react';
import { Tile } from './Tile';
import '../styles/Game.css';
export const Game = ({tiles, game_in_progress, current_moves, current_level_index}) => {
tiles = tiles.map(tile => <Tile key={tile.id} tile={tile} game_in_progress={ game_in_progress }/>);
return (
<div className='Game'
... | import React from 'react';
import { Tile } from './Tile';
import '../styles/Game.css';
export const Game = ({tiles, game_in_progress, current_moves, current_level_index}) => {
tiles = tiles.map(tile => <Tile key={tile.id} tile={tile} game_in_progress={ game_in_progress }/>);
return (
<div className='Game'
... | Change row column calculation to be non-conditional. | Change row column calculation to be non-conditional.
| JSX | mit | CaptainStack/chromattis,CaptainStack/chromattis | ---
+++
@@ -9,8 +9,8 @@
onContextMenu={event => event.preventDefault() }
style={{
display: game_in_progress ? null : 'none',
- gridTemplateColumns: `repeat(${ tiles.length < 4 ? tiles.length : Math.sqrt(tiles.length) }, ${ tiles.length < 4 ? 555 / tiles.length - 15 : 555 /... |
3e85a7b1df3c3081c7f1467fc69b6d038821c84e | src/app/app.jsx | src/app/app.jsx | import React from 'react';
import ReactDOM from 'react-dom';
import injectTapEventPlugin from 'react-tap-event-plugin';
import Main from './components/main'; // Our custom react component
//Needed for onTouchTap
//Can go away when react 1.0 release
//Check this repo:
//https://github.com/zilverline/react-tap-event-plu... | import React from 'react';
import ReactDOM from 'react-dom';
import injectTapEventPlugin from 'react-tap-event-plugin';
import Main from './components/main'; // Our custom react component
//Needed for onTouchTap
//Can go away when react 1.0 release
//Check this repo:
//https://github.com/zilverline/react-tap-event-plu... | Change the document render to main id | Change the document render to main id
| JSX | mit | yashshah/braintree-appbase-integration,yashshah/braintree-appbase-integration | ---
+++
@@ -11,4 +11,4 @@
// Render the main app react component into the app div.
// For more details see: https://facebook.github.io/react/docs/top-level-api.html#react.render
-ReactDOM.render(<Main />, document.getElementById('slider'));
+ReactDOM.render(<Main />, document.getElementById('main')); |
8aeab2b59382e99f7ab6bbb3fabadc3dd7b497ae | 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: "Your entire party has 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 prime directive confirmation text | Update prime directive confirmation text
| JSX | mit | stride-nyc/remote_retro,tnewell5/remote_retro,samdec11/remote_retro,stride-nyc/remote_retro,stride-nyc/remote_retro,tnewell5/remote_retro | ---
+++
@@ -3,7 +3,7 @@
export default {
"prime-directive": {
alert: null,
- confirmationMessage: "Your entire party has arrived?",
+ confirmationMessage: "Has your entire party arrived?",
nextStage: "idea-generation",
progressionButton: {
copy: "Proceed to Idea Generation", |
4629d181bffde77dd79c3eef2962ea7108392661 | src/resources/assets/js/reusable/system-messages.jsx | src/resources/assets/js/reusable/system-messages.jsx | import PropTypes from 'prop-types'
import React, { PureComponent } from 'react'
import SimpleMarkdown from 'simple-markdown'
import { Alert } from './ui_basic'
/**
* simple SystemMessages class for the overarching system messages.
*
* This is a 'pure' component which expects data to be passed to it.
*/
export cla... | import PropTypes from 'prop-types'
import React, { PureComponent } from 'react'
import SimpleMarkdown from 'simple-markdown'
import { Alert } from './ui_basic'
/**
* simple SystemMessages class for the overarching system messages.
*
* This is a 'pure' component which expects data to be passed to it.
*/
export cla... | Remove the timestamp from System Message display, it's confusing. | Remove the timestamp from System Message display, it's confusing.
| JSX | bsd-3-clause | tmlpstats/tmlpstats,rlorenzo/tmlpstats,rlorenzo/tmlpstats,tmlpstats/tmlpstats,rlorenzo/tmlpstats,tmlpstats/tmlpstats,rlorenzo/tmlpstats,tmlpstats/tmlpstats,rlorenzo/tmlpstats | ---
+++
@@ -21,9 +21,10 @@
let items = messages.map((message, i) => {
const parsed = SimpleMarkdown.defaultBlockParse(message.content)
+ const title = (message.updatedAt)? `Updated at ${message.updatedAt}` : undefined
return (
<Alert key={i} alert={mess... |
0b0b1e8266c3d2ee4624dbef10eed911308fc9d9 | src/frontend/components/admin/AdminHeader.jsx | src/frontend/components/admin/AdminHeader.jsx | 'use strict';
import React, {Component} from 'react';
import {render} from 'react-dom';
import adminService from '../../services/adminService.js';
import _ from 'underscore';
const AdminHeader = ({labs, selectedLab, onSelectLab}) => {
function mapLabOptions() {
return _.sortBy(labs, 'name').map( lab => (<... | 'use strict';
import React, {Component} from 'react';
import {render} from 'react-dom';
import adminService from '../../services/adminService.js';
import _ from 'underscore';
const AdminHeader = ({labs, selectedLab, onSelectLab}) => {
function mapLabOptions() {
return _.sortBy(labs, 'name').map( lab => (<... | Set to use value rather than default value | Set to use value rather than default value
| JSX | agpl-3.0 | rabblerouser/core,rabblerouser/core,rabblerouser/core | ---
+++
@@ -10,7 +10,7 @@
return _.sortBy(labs, 'name').map( lab => (<option key={lab.id} value={lab.id}>{lab.name}</option>));
};
- let labDescription = onSelectLab ? (<select defaultValue={selectedLab.id} onChange={selectLab}>{ mapLabOptions() }</select>)
+ let labDescription = onSelectLab ? (... |
ba32d4fe130a6db7cd37640b72fef0d05e6e7003 | src/todos/app.jsx | src/todos/app.jsx | 'use strict';
import React from 'react';
import TodoInput from './components/todoInput';
import TodosList from './components/todosList';
import todosActions from './actions';
import todosStore from './store';
import {EVENT_CHANGE} from './store';
import '../bootstrap.less';
import './app.less';
var getTodosState ... | 'use strict';
import React from 'react';
import TodoInput from './components/todoInput';
import TodosList from './components/todosList';
import todosActions from './actions';
import todosStore from './store';
import {EVENT_CHANGE} from './store';
import '../bootstrap.less';
import './app.less';
var getTodosState ... | Rewrite <TodoApp> to new ES6 class syntax | Rewrite <TodoApp> to new ES6 class syntax
| JSX | mit | yejodido/webpack-todomvc,yejodido/webpack-todomvc | ---
+++
@@ -20,26 +20,27 @@
};
-var TodoApp = React.createClass({
- getInitialState() {
- return getTodosState();
- },
+class TodoApp extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = getTodosState();
+ }
create(text) {
todosActions.create(text);
- },
+ }
... |
b1be6bb61baa8e9385a9e7382d5c80273a5bddfa | lib/components/groceries/GroceriesListJson.jsx | lib/components/groceries/GroceriesListJson.jsx | import React, { PropTypes } from 'react';
export default class GroceriesListJson extends React.Component {
static propTypes = {
groceries: PropTypes.array.Required,
}
render() {
const { groceries } = this.props;
const groceriesJSON = JSON.stringify({
groceries: groceries.toJS(),
});
re... | import React, { PropTypes } from 'react';
export default class GroceriesListJson extends React.Component {
static propTypes = {
groceries: PropTypes.array.Required,
}
render() {
const { groceries } = this.props;
const groceriesJSON = JSON.stringify(
groceries.toJS().map((item) => item.title),
... | Change json groceries list output | Change json groceries list output
| JSX | mit | Zapix/react-groceries,Zapix/react-groceries,Zapix/react-groceries | ---
+++
@@ -7,12 +7,11 @@
render() {
const { groceries } = this.props;
- const groceriesJSON = JSON.stringify({
- groceries: groceries.toJS(),
- });
+ const groceriesJSON = JSON.stringify(
+ groceries.toJS().map((item) => item.title),
+ );
return (
<div>
- {groceries... |
024af55133fbf3c8dced3f22ba7dd8b0e1829332 | ui/Editor.jsx | ui/Editor.jsx | import React, { PropTypes } from 'react';
import AceEditor from 'react-ace';
import brace from 'brace';
import 'brace/mode/rust';
import 'brace/theme/github';
import 'brace/keybinding/emacs';
export default class Editor extends React.Component {
render() {
const { code, onEditCode } = this.props;
return (
... | import React, { PropTypes } from 'react';
import AceEditor from 'react-ace';
import brace from 'brace';
import 'brace/mode/rust';
import 'brace/theme/github';
import 'brace/keybinding/emacs';
// https://github.com/securingsincity/react-ace/issues/95
import 'brace/ext/language_tools';
export default class Editor exten... | Hide warnings from disabled features | Hide warnings from disabled features
| JSX | apache-2.0 | integer32llc/rust-playground,integer32llc/rust-playground,integer32llc/rust-playground,integer32llc/rust-playground,integer32llc/rust-playground | ---
+++
@@ -5,6 +5,8 @@
import 'brace/mode/rust';
import 'brace/theme/github';
import 'brace/keybinding/emacs';
+// https://github.com/securingsincity/react-ace/issues/95
+import 'brace/ext/language_tools';
export default class Editor extends React.Component {
render() { |
d3faf7e6b4a55a91602bb7ab514c7cc66ec1bf4f | src/components/Search/index.jsx | src/components/Search/index.jsx | import React from 'react';
import { connect } from 'react-redux';
import { getSearchResults } from '../../actions/search';
import SearchInput from './SearchInput';
import SearchButton from './SearchButton';
import './Search.scss';
const propTypes = {
getSearchResults: React.PropTypes.func,
searchInput: React.PropT... | import React from 'react';
import { connect } from 'react-redux';
import { DATA_FETCH_STATUS } from 'constants';
import { getSearchResults } from 'actions/search';
import SearchInput from './SearchInput';
import SearchButton from './SearchButton';
import './Search.scss';
const propTypes = {
getSearchResults: React.P... | Fix search button not disabling properly | Fix search button not disabling properly
| JSX | mit | giuband/dunya-frontend,giuband/dunya-frontend | ---
+++
@@ -1,6 +1,7 @@
import React from 'react';
import { connect } from 'react-redux';
-import { getSearchResults } from '../../actions/search';
+import { DATA_FETCH_STATUS } from 'constants';
+import { getSearchResults } from 'actions/search';
import SearchInput from './SearchInput';
import SearchButton from ... |
1b71a38df369a5352a1a2119c6e5fd1b1e91f51a | src/js/AnimalImage.jsx | src/js/AnimalImage.jsx | 'use strict';
var AnimalImage = React.createClass({
getInitialState: function() {
return {
loaded: false
};
},
});
module.exports = AnimalImage;
| 'use strict';
var AnimalImage = React.createClass({
getInitialState: function() {
return {
loaded: false
};
},
componentDidMount: function(){
var self = this;
var img = document.createElement('img');
img.onload = function(){
self.setState({ loaded: true});
};
img.src = thi... | Make sure the component is fetched before rendering | Make sure the component is fetched before rendering
| JSX | isc | Yangani/maasai-mara,Yangani/maasai-mara | ---
+++
@@ -6,6 +6,14 @@
};
},
+ componentDidMount: function(){
+ var self = this;
+ var img = document.createElement('img');
+ img.onload = function(){
+ self.setState({ loaded: true});
+ };
+ img.src = this.props.src;
+ },
});
module.exports = AnimalImage; |
9cf4361e478dc8b4fe60d05c755e1662d677a98b | app/scripts/components/header/top-bar.jsx | app/scripts/components/header/top-bar.jsx | var React = require('react');
var Navbar = require('react-bootstrap').Navbar;
var NavItem = require('react-bootstrap').NavItem;
var Nav = require('react-bootstrap').Nav;
var DropdownButton = require('react-bootstrap').DropdownButton;
var MenuItem = require('react-bootstrap').MenuItem;
//Sample config. TODO: pass it in... | var _ = require('lodash');
var React = require('react');
var Branding = require('../../shared/components/branding/branding.jsx');
var NavLinks = require('../../shared/components/nav-links/nav-links.jsx');
var Greeting = require('../../shared/components/greeting/greeting.jsx');
var TopBar = React.createClass({
getDef... | Add top bar component with branding and logout functionality | [TASK] Add top bar component with branding and logout functionality
| JSX | isc | cryptospora/gatewayd-basic-app,AiNoKame/gatewayd-basic-admin-dec,dabibbit/gatewayd-quoting-app,dabibbit/gatewayd-banking-app,n0rmz/gatewayd-client,AiNoKame/gatewayd-basic-admin-phase-1,hserang/gatewayd-admin-seeds,dabibbit/gatewayd-banking-app,n0rmz/gatewayd-client,dabibbit/gatewayd-quoting-app | ---
+++
@@ -1,62 +1,48 @@
+var _ = require('lodash');
var React = require('react');
-var Navbar = require('react-bootstrap').Navbar;
-var NavItem = require('react-bootstrap').NavItem;
-var Nav = require('react-bootstrap').Nav;
-var DropdownButton = require('react-bootstrap').DropdownButton;
-var MenuItem = require('... |
e1abbcb12fe9a0f143bbf5d3a82ff1126a11f9a3 | app/app.jsx | app/app.jsx | import 'client/libs';
import React from 'react';
import ReactDOM from 'react-dom';
import App from './client/components/main/app';
import configureStore from './client/main-store';
import { clientFetchData } from './client/helpers/fetch-data';
import { getRoutes, getClientHistory } from './routes';
if (process.env.NO... | import 'client/libs';
import React from 'react';
import ReactDOM from 'react-dom';
import App from './client/components/main/app';
import configureStore from './client/main-store';
import { clientFetchData } from './client/helpers/fetch-data';
import { getRoutes, getClientHistory } from './routes';
const appDOM = doc... | Move offline-plugin after logic code | Move offline-plugin after logic code
| JSX | mit | hung-phan/koa-react-isomorphic,hung-phan/all-hail-the-R,hung-phan/koa-react-isomorphic,hung-phan/all-hail-the-R,hung-phan/koa-react-isomorphic | ---
+++
@@ -6,10 +6,6 @@
import configureStore from './client/main-store';
import { clientFetchData } from './client/helpers/fetch-data';
import { getRoutes, getClientHistory } from './routes';
-
-if (process.env.NODE_ENV === 'production') {
- require('offline-plugin/runtime').install();
-}
const appDOM = docu... |
095bc4c04c3ebc11910497f98e5036a7431fdf3a | src/components/Table/TableHeaderColumn.jsx | src/components/Table/TableHeaderColumn.jsx | import React from 'react';
import ReactTooltip from 'react-tooltip';
import uuid from 'node-uuid';
import { TableHeaderColumn as MaterialTableHeaderColumn } from 'material-ui/Table';
import { getSortIcon } from './tableHelpers';
import styles from './Table.css';
export default ({ column, sortClick, sortField, sortStat... | import React from 'react';
import ReactTooltip from 'react-tooltip';
import uuid from 'node-uuid';
import { TableHeaderColumn as MaterialTableHeaderColumn } from 'material-ui/Table';
import { getSortIcon } from './tableHelpers';
import styles from './Table.css';
export default ({ column, sortClick, sortField, sortStat... | Fix table header tooltip cursor | Fix table header tooltip cursor
| JSX | mit | zya6yu/ui,odota/ui,mdiller/ui,zya6yu/ui,coreymaher/ui,zya6yu/ui,mdiller/ui,coreymaher/ui,odota/ui,odota/ui,mdiller/ui | ---
+++
@@ -14,7 +14,7 @@
className={column.sortFn ? styles.headerCell : styles.headerCellNoSort}
onClick={() => column.sortFn && sortClick(column.field, sortState, column.sortFn)}
>
- <div data-tip data-for={tooltipId} style={{ color: column.color }}>
+ <div data-tip={column.to... |
b1c913fe64fc365ad39ff701d23a6b5880300528 | src/components/language-selector/language-selector.jsx | src/components/language-selector/language-selector.jsx | import PropTypes from 'prop-types';
import React from 'react';
import locales from 'scratch-l10n';
import styles from './language-selector.css';
// supported languages to exclude from the menu, but allow as a URL option
const ignore = ['he'];
const LanguageSelector = ({currentLocale, label, onChange}) => (
<sele... | import PropTypes from 'prop-types';
import React from 'react';
import locales from 'scratch-l10n';
import styles from './language-selector.css';
// supported languages to exclude from the menu, but allow as a URL option
const ignore = [];
const LanguageSelector = ({currentLocale, label, onChange}) => (
<select
... | Remove ‘he’ from the languages to ignore | Remove ‘he’ from the languages to ignore
I left the ability to ignore languages in place so that we can continue to have languages that are available, but not in the menu for everyone.
| JSX | bsd-3-clause | LLK/scratch-gui,cwillisf/scratch-gui,cwillisf/scratch-gui,cwillisf/scratch-gui,LLK/scratch-gui | ---
+++
@@ -5,7 +5,7 @@
import styles from './language-selector.css';
// supported languages to exclude from the menu, but allow as a URL option
-const ignore = ['he'];
+const ignore = [];
const LanguageSelector = ({currentLocale, label, onChange}) => (
<select |
94a1ecca28b3642b2b19dc7ea20436198b2af1c9 | app/javascript/lca/components/generic/abilitySelect.jsx | app/javascript/lca/components/generic/abilitySelect.jsx | import React from 'react'
import PropTypes from 'prop-types'
import SelectField from 'material-ui/SelectField'
import MenuItem from 'material-ui/MenuItem'
import { ABILITIES_ALL } from '../../utils/constants.js'
class AbilitySelect extends React.Component {
render() {
const abils = this.props.abilities || ABILI... | import React from 'react'
import PropTypes from 'prop-types'
import SelectField from 'material-ui/SelectField'
import MenuItem from 'material-ui/MenuItem'
import { ABILITIES_ALL } from '../../utils/constants.js'
class AbilitySelect extends React.Component {
render() {
const abils = this.props.abilities || ABILI... | Fix proptypes error with AbilitySelect | Fix proptypes error with AbilitySelect
| JSX | agpl-3.0 | makzu/lotcastingatemi,makzu/lotcastingatemi,makzu/lotcastingatemi,makzu/lotcastingatemi,makzu/lotcastingatemi | ---
+++
@@ -28,7 +28,7 @@
abilities: PropTypes.arrayOf(PropTypes.object),
multiple: PropTypes.bool,
name: PropTypes.string.isRequired,
- value: PropTypes.string.isRequired,
+ value: PropTypes.oneOf([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]).isRequired,
floatingLabelText: PropTypes.string,
... |
ec83c98ab594dfe5b49266d037dd364645fb46f3 | frontend/realtime_client/realtime_client.jsx | frontend/realtime_client/realtime_client.jsx | const io = require('socket.io-client'),
config = require('./config.js');
const UnichatClient = {
_realtimeUrl: null,
_socket: null,
_clientId: null,
_roomId: 'room1',
_canSendMessages: false,
init(realtimeUrl) {
this._realtimeUrl = realtimeUrl;
this._socket = io.connect(th... | const io = require('socket.io-client'),
config = require('./config.js');
const UnichatClient = {
_realtimeUrl: null,
_socket: null,
_clientId: null,
_roomId: 'room1',
_canSendMessages: false,
init(realtimeUrl) {
this._realtimeUrl = realtimeUrl;
this._socket = io.connect(th... | Use forceNew in realtime client sockets | Use forceNew in realtime client sockets
| JSX | mit | dimkarakostas/unimeet,dimkarakostas/unimeet,dimkarakostas/unimeet,dimkarakostas/unimeet | ---
+++
@@ -9,7 +9,7 @@
_canSendMessages: false,
init(realtimeUrl) {
this._realtimeUrl = realtimeUrl;
- this._socket = io.connect(this._realtimeUrl);
+ this._socket = io.connect(this._realtimeUrl, {'forceNew': true});
this._socket.on('connect', () => {
console.lo... |
dee56453869a41288200ad12133c9471617f38bb | shared/components/Header/Header.jsx | shared/components/Header/Header.jsx | import React, { PropTypes } from 'react';
import { Link } from 'react-router';
function Header(props, context) {
return (
<div className="header">
<div className="header-content">
<h1 className="site-title">
<Link to="/" onClick={props.handleLogoClick}>MERN Starter Blog asdf</Link>
... | import React, { PropTypes } from 'react';
import { Link } from 'react-router';
function Header(props, context) {
return (
<div className="header">
<div className="header-content">
<h1 className="site-title">
<Link to="/" onClick={props.handleLogoClick}>MERN Starter Blog</Link>
</h... | Remove the reduntant header buzz. | Remove the reduntant header buzz.
| JSX | mit | BitTigerInst/ElasticSearch | ---
+++
@@ -6,7 +6,7 @@
<div className="header">
<div className="header-content">
<h1 className="site-title">
- <Link to="/" onClick={props.handleLogoClick}>MERN Starter Blog asdf</Link>
+ <Link to="/" onClick={props.handleLogoClick}>MERN Starter Blog</Link>
</h1>
... |
7a41141230d2cef53a68162e3f29eab142d5952b | app/src/components/Map/NoLogin.jsx | app/src/components/Map/NoLogin.jsx | import React, { Component } from 'react';
import { Link } from 'react-router';
import styles from '../../../styles/components/map/c-no-login.scss';
class NoLogin extends Component {
render() {
return (
<div className={styles['c-no-login']}>
<p className={styles.back}>
<Link to="/">← Visi... | import React, { Component } from 'react';
import { Link } from 'react-router';
import styles from '../../../styles/components/map/c-no-login.scss';
class NoLogin extends Component {
render() {
return (
<div className={styles['c-no-login']}>
<p className={styles.back}>
<Link to="/">← Visi... | Update map login modal message | Update map login modal message
| JSX | mit | Vizzuality/GlobalFishingWatch,Vizzuality/GlobalFishingWatch,Vizzuality/GlobalFishingWatch | ---
+++
@@ -12,11 +12,8 @@
</p>
<h2 className={styles.title}>Login required</h2>
<p className={styles.content}>
- You must log in to view the Map. If you are a registered user,
- <a onClick={this.props.login}>log in here</a>
- </p>
- <p className={style... |
95f3644872541c15664afc3427c7fde630758834 | src/App.jsx | src/App.jsx | import React from 'react';
// import logo from './logo.svg';
import './App.scss';
import NoteForm from './components/notes/NoteForm';
import NotesWrapper from './components/notes/NotesWrapper';
import UpdateModal from './components/notes/UpdateModal';
import AlertsWrapper from './components/AlertsWrapper';
export defa... | import React from 'react';
// import logo from './logo.svg';
import './App.scss';
import NoteForm from './components/notes/NoteForm';
import NotesWrapper from './components/notes/NotesWrapper';
import UpdateModal from './components/notes/UpdateModal';
import AlertsWrapper from './components/AlertsWrapper';
export defa... | Add alert handler and callbacks | Add alert handler and callbacks
| JSX | mit | emyarod/refuge,emyarod/refuge | ---
+++
@@ -22,13 +22,22 @@
this.setState({ modal: true, note, });
}
+ handleAlert(alert) {
+ this.refs.alerts.addAlert(alert)
+ }
+
render() {
return (
<div>
- <NoteForm />
- <Notes modalHandler={note => this.displayModal(note)} />
+ <AlertsWrapper ref="alerts" />
+... |
d35aa3a3768d0874e8bec27102ff67d3f06d6e21 | imports/ui/report-view/report-view.jsx | imports/ui/report-view/report-view.jsx | import React from 'react';
const ReportView = (props) => (
<h1> Report view </h1>
);
export default ReportView;
| import React from 'react';
import { Col } from 'react-bootstrap';
import MeasureExplorer from '../measure-view/measure-explorer.jsx';
import ElementTree from '../structure-view/element-tree/element-tree.jsx';
const ReportView = (props) => (
<div>
<Col mdOffset={1} md={2}>
<ElementTree setSelectedElementId=... | Add element tree and measure explorer to report view | Add element tree and measure explorer to report view
| JSX | mit | minden/data-furnace,minden/data-furnace | ---
+++
@@ -1,7 +1,18 @@
import React from 'react';
+import { Col } from 'react-bootstrap';
+import MeasureExplorer from '../measure-view/measure-explorer.jsx';
+import ElementTree from '../structure-view/element-tree/element-tree.jsx';
const ReportView = (props) => (
- <h1> Report view </h1>
+ <div>
+ <Col ... |
93372d3f022c36282e4279011d79248b03c03021 | src/index.jsx | src/index.jsx | /** @jsx createElement */
import {createElement} from 'elliptical'
function suppressWhen (input) {
return /^\+?\(?(\d[ ()/-]{0,2}){0,6}$/.test(input)
}
function filter (input) {
return /^\+?\(?(\d[ ()/-]{0,2}){7,15}$/.test(input)
}
const defaultProps = {
label: 'phone number'
}
function describe ({props}) {
... | /** @jsx createElement */
import {createElement} from 'elliptical'
function suppressWhen (input) {
return /^\+?\(?(\d[ ()/-]{0,2}){0,6}$/.test(input)
}
function filter (input) {
return /^\+?\(?(\d[ ()/-]{0,2}){7,15}$/.test(input)
}
const defaultProps = {
label: 'phone number'
}
function describe ({props}) {
... | Add id to make extension in Lacona easier | Add id to make extension in Lacona easier
| JSX | mit | lacona/lacona-phrase-phone-number,brandonhorst/lacona-phrase-phonenumber,lacona/lacona-phrase-phonenumber | ---
+++
@@ -24,4 +24,4 @@
)
}
-export const PhoneNumber = {describe, defaultProps}
+export const PhoneNumber = {describe, defaultProps, id: 'elliptical-phone:PhoneNumber'} |
99a29e5aebc2c283ee1d2d68881323021187c7eb | js/Search.jsx | js/Search.jsx | const React = require('react')
const data = require('../public/data')
const ShowCard = require('./ShowCard')
// key is needed for console/webpack complaint to go away. \
// key is a unique identifier
const Search = React.createClass({
getInitialState () {
return {
searchTerm: 'this is my seach term'
}... | const React = require('react')
const data = require('../public/data')
const ShowCard = require('./ShowCard')
// key is needed for console/webpack complaint to go away. \
// key is a unique identifier
//have to bind this when this syntaxis is uses
// class Search extends React.Component {
// constructor(props) {
/... | Add note about extends method | Add note about extends method
| JSX | mit | teatreelee/complete-react,teatreelee/complete-react | ---
+++
@@ -4,6 +4,17 @@
// key is needed for console/webpack complaint to go away. \
// key is a unique identifier
+
+
+
+//have to bind this when this syntaxis is uses
+// class Search extends React.Component {
+// constructor(props) {
+// super(props)
+
+// this.handleSearchTermEvent = this.handleSea... |
dcea78f1acb0509f08c52460362591ce0525d5dd | 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 {
/**
* @param {object} props
* @param {number} props.width - Width of the diagra... | Remove whoopsy from constructor doc | Remove whoopsy from constructor doc
| JSX | epl-1.0 | circuitsim/circuit-simulator,circuitsim/circuit-simulator,circuitsim/circuit-simulator | ---
+++
@@ -12,7 +12,6 @@
export default class CircuitDiagram extends React.Component {
/**
- * [constructor description]
* @param {object} props
* @param {number} props.width - Width of the diagram
* @param {number} props.height - Height of the diagram |
d8788dc30ea0f7ce1d3399db563010b83978ecc7 | src/lib/components/timeago.jsx | src/lib/components/timeago.jsx | 'use strict';
var React = require('react');
var SetIntervalMixin = require('./set-interval-mixin');
var moment = require('moment');
module.exports = React.createClass({
mixins: [ SetIntervalMixin ],
render: function () {
var time = moment(this.props.time);
return <span title={time.format('MMM ... | 'use strict';
var React = require('react');
var SetIntervalMixin = require('./set-interval-mixin');
var moment = require('moment');
module.exports = React.createClass({
mixins: [ SetIntervalMixin ],
render: function () {
var time = moment(this.props.time);
return <span title={time.format('MMM ... | Fix bug which caused the time ago component to not get default duration | Fix bug which caused the time ago component to not get default duration
| JSX | unknown | avanderhoorn/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,avanderhoorn/Glimpse.Client.Prototype | ---
+++
@@ -11,7 +11,7 @@
return <span title={time.format('MMM Do YYYY, h:mm:ss a')}>{time.fromNow()}</span>;
},
componentDidMount: function () {
- var interval = this.props.time || 60000;
+ var interval = this.props.duration || 60000;
this.setInterval(this.forceUpdate.bind... |
99d46ab4e6ee30af5e63b5e8df95223569abbc23 | client/src/components/connectors/WithPlayer.jsx | client/src/components/connectors/WithPlayer.jsx | import React, { Component } from 'react'
import { connect } from 'react-redux'
import { requestPlayer } from 'actions/playerSearch'
import { playersSelector } from 'utils/selectors'
const _withPlayer = playerId => (WrappedComponent) => {
class WithPlayer extends Component {
componentDidMount() {
... | import React, { Component } from 'react'
import { connect } from 'react-redux'
import { requestPlayer } from 'actions/playerSearch'
import { playersSelector } from 'utils/selectors'
const _withPlayer = playerId => (WrappedComponent) => {
class WithPlayer extends Component {
componentDidMount() {
... | Fix player profile links not working by making sure connected component will re-render when id from params changes | Fix player profile links not working by making sure connected component will re-render when id from params changes
| JSX | apache-2.0 | prattl/teamfinder,prattl/teamfinder,prattl/teamfinder,prattl/teamfinder | ---
+++
@@ -31,10 +31,23 @@
this.state = {
ConnectedComponent: null
}
+ this.updateConnectedComponent = this.updateConnectedComponent.bind(this)
+ }
+
+ updateConnectedComponent() {
+ this.setState({ ConnectedComponent: _withPlayer(mapProp... |
0b25c365a468ecd9ed9b27c3cab840dad860736d | lib/app.jsx | lib/app.jsx | import React from 'react';
import { BrandLogo } from '../src';
// eslint-disable-next-line
import documentation from './loaders/jsdoc!../src';
export default function App() {
return <BrandLogo size={200} />;
}
| import React from 'react';
import { BrandLogo } from '../src';
import documentation from './loaders/jsdoc!../src'; // eslint-disable-line
export default function App() {
return <BrandLogo size={200} />;
}
| Disable eslint for a line inline | Disable eslint for a line inline
| JSX | mit | ahuth/mavenlink-ui-concept,mavenlink/mavenlink-ui-concept | ---
+++
@@ -1,7 +1,6 @@
import React from 'react';
import { BrandLogo } from '../src';
-// eslint-disable-next-line
-import documentation from './loaders/jsdoc!../src';
+import documentation from './loaders/jsdoc!../src'; // eslint-disable-line
export default function App() {
return <BrandLogo size={200} />; |
de9cbb712f9956fdf39acc7b6cb49ea1ca884a3f | src/javascript/app_2/App/Components/Routes/route_with_sub_routes.jsx | src/javascript/app_2/App/Components/Routes/route_with_sub_routes.jsx | import React from 'react';
import {
Redirect,
Route } from 'react-router-dom';
import LoginPrompt from '../Elements/login_prompt.jsx';
import { default_title } from '../../Constants/app_config';
import routes from '../../../Constants/routes';
import { redirect... | import React from 'react';
import {
Redirect,
Route } from 'react-router-dom';
import LoginPrompt from '../Elements/login_prompt.jsx';
import { default_title } from '../../Constants/app_config';
import routes from '../../../Constants/routes';
import { redirect... | Fix missing icon on login message | Fix missing icon on login message
| JSX | apache-2.0 | binary-static-deployed/binary-static,kellybinary/binary-static,ashkanx/binary-static,ashkanx/binary-static,kellybinary/binary-static,4p00rv/binary-static,ashkanx/binary-static,kellybinary/binary-static,4p00rv/binary-static,binary-com/binary-static,binary-static-deployed/binary-static,4p00rv/binary-static,binary-com/bin... | ---
+++
@@ -25,7 +25,9 @@
result = (
(route.is_authenticated && !Client.isLoggedIn()) ?
<LoginPrompt onLogin={redirectToLogin}>
- <route.icon_component className='disabled' />
+ { route.icon_component && // TODO: needs a ... |
3ae5ebe862f3058b418d83c859d0319388d6374d | src/components/pages/home-page.jsx | src/components/pages/home-page.jsx | import {Link} from "react-router"
import React from "react"
import BreadCrumb from "../breadcrumb"
var HomePage = React.createClass({
render() {
return (
<section>
<BreadCrumb />
<div className="page-header">
<h1>Explorateur de la législation</h1>
</div>
<div cla... | import {Link} from "react-router"
import React from "react"
import BreadCrumb from "../breadcrumb"
var HomePage = React.createClass({
render() {
return (
<section>
<BreadCrumb />
<div className="page-header">
<h1>Explorateur de la législation</h1>
</div>
<div cla... | Add final '/' in URL path | Add final '/' in URL path
| JSX | agpl-3.0 | openfisca/legislation-explorer | ---
+++
@@ -20,7 +20,7 @@
Visualiser et rechercher les variables d'entrée, les variables calculées et leurs dépendences.
</p>
<p>
- <a className="btn btn-primary" href="/graph">Graphe »</a>
+ <a className="btn btn-primary" href="/graph/">Gra... |
3c5d522bf53309c12ad3bc869f6728fbb81c395e | components/BusinessPage/Carousel.jsx | components/BusinessPage/Carousel.jsx | /** @jsx React.DOM */
'use strict';
var React = require('react');
var _ = require('lodash');
var Picture = require('../Partial/Picture.jsx');
module.exports = React.createClass({
render: function () {
var items = _.map(this.props.pictures, function (picture, i) {
var cls = (i == 0) ? "item ac... | /** @jsx React.DOM */
'use strict';
var React = require('react');
var _ = require('lodash');
var Picture = require('../Partial/Picture.jsx');
module.exports = React.createClass({
render: function () {
var items = _.map(this.props.pictures, function (picture, i) {
var cls = (i == 0) ? "item ac... | Reduce a bit business images | Reduce a bit business images
| JSX | mit | Hairfie/Website,Hairfie/Website,Hairfie/Website | ---
+++
@@ -12,7 +12,7 @@
var cls = (i == 0) ? "item active" : "item";
return (
<div className={cls}>
- <Picture picture={picture} />
+ <Picture picture={picture} options={{flags:['lossy']}} />
</div>
);
... |
1a6e307c544644fbaed323058a8f74d4cb937178 | src/react-lory.jsx | src/react-lory.jsx | import React, { Component, PropTypes } from 'react'
import ReactLorySlider from './react-lory-slider'
import Spinner from '@schibstedspain/sui-spinner'
import LazyLoad from 'react-lazy-load'
const spinnerConfig = {
size: 20,
thickness: 2,
type: 'circle'
}
export default class ReactLory extends Component {
con... | import React, { Component, PropTypes } from 'react'
import ReactLorySlider from './react-lory-slider'
import Spinner from '@schibstedspain/sui-spinner'
import LazyLoad from 'react-lazy-load'
const spinnerConfig = {
size: 20,
thickness: 2,
type: 'circle'
}
export default class ReactLory extends Component {
con... | Update component when loading is finished | Update component when loading is finished
| JSX | mit | miduga/react-slidy | ---
+++
@@ -20,6 +20,10 @@
hideSpinner () {
this.setState({ loading: false })
+ }
+
+ shouldComponentUpdate (nextProps, nextState) {
+ return this.state.loading !== this.nextState.loading
}
render () { |
a492550524208d4723309268e33e1044700d0a58 | assets/js/index.jsx | assets/js/index.jsx | var div_page = document.getElementsByClassName('page')[0];
const gustavo = {
nome: 'Gustavo',
sobrenome: 'Moraes'
};
function exibeNomePessoa(pessoa) {
return pessoa.nome + ' ' + pessoa.sobrenome;
}
/**
* Componente *funcional* React.
* Renderiza uma mensagem de boas vindas para o nome passado como parâmetro... | var div_page = document.getElementsByClassName('page')[0];
const gustavo = {
nome: 'Gustavo',
sobrenome: 'Moraes'
};
function exibeNomePessoa(pessoa) {
return pessoa.nome + ' ' + pessoa.sobrenome;
}
/**
* Componente *funcional* React.
* Renderiza uma mensagem de boas vindas para o nome passado como parâmetro... | Revert "Transforma uma classe-componente React em uma variável-componente React" | Revert "Transforma uma classe-componente React em uma variável-componente React"
This reverts commit 3065f5752af4bbaefeb08271ef2f11a34ffe453c.
Revertido porque a forma anterior é a mais moderna e usual de se criar componentes React.
| JSX | mit | gustavosotnas/SandboxReact,gustavosotnas/SandboxReact | ---
+++
@@ -13,7 +13,7 @@
* Componente *funcional* React.
* Renderiza uma mensagem de boas vindas para o nome passado como parâmetro.
*/
-var BemVindo = React.createClass({
+class BemVindo extends React.Component {
render() {
if (this.props.pessoa) {
@@ -29,7 +29,7 @@
</div>
);
}
-});
+}
cons... |
ad7d75818c05add46816733ed3eddb7d423e2113 | src/renderer/components/server-list.jsx | src/renderer/components/server-list.jsx | import React, { Component, PropTypes } from 'react';
import ServerListItem from './server-list-item.jsx';
import Message from './message.jsx';
export default class ServerList extends Component {
static propTypes = {
servers: PropTypes.array.isRequired,
onEditClick: PropTypes.func.isRequired,
onConnectCl... | import React, { Component, PropTypes } from 'react';
import ServerListItem from './server-list-item.jsx';
import Message from './message.jsx';
export default class ServerList extends Component {
static propTypes = {
servers: PropTypes.array.isRequired,
onEditClick: PropTypes.func.isRequired,
onConnectCl... | Use id as key to render server item | Use id as key to render server item
I used the server name + client type in the previous commit. But since we now have the id field again, then makes more sense use the id. | JSX | mit | sqlectron/sqlectron-gui,sqlectron/sqlectron-gui,sqlectron/sqlectron-gui,sqlectron/sqlectron-gui | ---
+++
@@ -39,7 +39,7 @@
{this.groupItemsInRows(servers).map((row, rowIdx) =>
<div key={rowIdx} className="doubling four column row">
{row.map(server =>
- <div key={`${server.name}_${server.client}`} className="wide column">
+ <div key={server.id} className=... |
117a504083f7535989e287a40bcb507b667b4897 | src/components/Home.jsx | src/components/Home.jsx | import React from 'react';
import styles from '../stylesheets/components/common/typography.css';
const Home = () => (
<React.Fragment>
<h1 className={styles.heading}>Home</h1>
</React.Fragment>
);
export default Home;
| import React from 'react';
import styles from '../stylesheets/components/common/typography.css';
const Home = () => (
<>
<h1 className={styles.heading}>Home</h1>
</>
);
export default Home;
| Use shorthand notation for fragments | Use shorthand notation for fragments
| JSX | mit | laschuet/react-starter-kit,laschuet/react-starter-kit | ---
+++
@@ -3,9 +3,9 @@
import styles from '../stylesheets/components/common/typography.css';
const Home = () => (
- <React.Fragment>
+ <>
<h1 className={styles.heading}>Home</h1>
- </React.Fragment>
+ </>
);
export default Home; |
08f8ee19d029849efaaedbbf31cad79163f77e19 | 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
| 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... |
2a1ffc42ac854ec6a390ecc90091b6d765217a8c | test/index.jsx | test/index.jsx | import React from 'react';
import {render} from 'react-dom';
import {Calendar} from '../src/components';
// Styles
import '../src/sass/default.scss';
// Needed for onTouchTap
import injectTapEventPlugin from 'react-tap-event-plugin';
injectTapEventPlugin();
const container1 = document.createElement('div');
container... | import React from 'react';
import {render} from 'react-dom';
import {Calendar} from '../src';
import moment from 'moment';
// Styles
import '../src/sass/default.scss';
// Needed for onTouchTap
import injectTapEventPlugin from 'react-tap-event-plugin';
injectTapEventPlugin();
const container1 = document.createElement... | Test se anaden fechas diferentes en los calendarios | Test se anaden fechas diferentes en los calendarios
| JSX | mit | gmunoz1979/migtra-component.calendar,gmunoz1979/migtra-component.calendar | ---
+++
@@ -1,6 +1,7 @@
import React from 'react';
import {render} from 'react-dom';
-import {Calendar} from '../src/components';
+import {Calendar} from '../src';
+import moment from 'moment';
// Styles
import '../src/sass/default.scss';
@@ -14,7 +15,11 @@
container1.style.width = '300px';
container1.style.h... |
9e87546d85f511563500fcf7a07d5972e868bc25 | src/components/Portfolio.jsx | src/components/Portfolio.jsx | import React from 'react';
import { Match, Link } from 'react-router';
import projectData from '../data/projectData';
import Project from './Project';
export default function Portfolio({ pathname }) {
return (
<div className="portfolio">
<Match pattern={`${pathname}/:path`} component={Project} />
<Ma... | import React from 'react';
import { Match, Link } from 'react-router';
import Jumbotron from './Jumbotron';
import Label from './Label';
import Project from './Project';
import BlockRevealer from './BlockRevealer';
import BlockRevealParagraph from './BlockRevealParagraph';
import handleEnterViewport from '../config/uti... | Use new Jumbotron Replace filler text | Use new Jumbotron
Replace filler text
| JSX | mit | emyarod/afw,emyarod/afw | ---
+++
@@ -1,20 +1,30 @@
import React from 'react';
import { Match, Link } from 'react-router';
+import Jumbotron from './Jumbotron';
+import Label from './Label';
+import Project from './Project';
+import BlockRevealer from './BlockRevealer';
+import BlockRevealParagraph from './BlockRevealParagraph';
+import han... |
236cde7f5fcec50d1c585a7fdc520be748b67920 | client/js/components/common/drop_zones.jsx | client/js/components/common/drop_zones.jsx | import React from 'react';
import { DropTarget } from 'react-dnd';
import ItemTypes from './draggable_item_types';
const groupWordTarget = {
drop(props, monitor) {
let items = [];
switch(monitor.getItemType()) {
case ItemTypes.WORD:
items = [monitor.getItem().itemId];
... | import React from 'react';
import { DropTarget } from 'react-dnd';
import ItemTypes from './draggable_item_types';
const groupWordTarget = {
drop(props, monitor) {
if(!monitor.didDrop()) {
let items = [];
switch(monitor.getItemType()) {
case ItemTypes.WORD:
ite... | Return the item if the drop zone handled it | Return the item if the drop zone handled it
| JSX | mit | atomicjolt/OpenAssessmentsClient,atomicjolt/OpenAssessmentsClient,atomicjolt/OpenAssessmentsClient,atomicjolt/open_assessments,atomicjolt/open_assessments,atomicjolt/open_assessments | ---
+++
@@ -5,22 +5,26 @@
const groupWordTarget = {
drop(props, monitor) {
- let items = [];
+ if(!monitor.didDrop()) {
+ let items = [];
- switch(monitor.getItemType()) {
- case ItemTypes.WORD:
- items = [monitor.getItem().itemId];
- break;
- case ItemTypes.WORD_GROUP:
-... |
558480ff03b7c1e466896ad9d4ecc3c8d59eb39c | client/app/bundles/ConifyClient/components/Main.jsx | client/app/bundles/ConifyClient/components/Main.jsx | import React from 'react';
class Main extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div class="main">
{React.cloneElement(this.props.children, this.props)}
</div>
);
}
}
export default Main;
| import React from 'react';
class Main extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div class="main">
{this.props.children}
</div>
);
}
}
export default Main;
| Resolve non-fatal errors about refs | Resolve non-fatal errors about refs
| JSX | mit | flarinerin/conify,flarinerin/conify,flarinerin/conify,flarinerin/conify | ---
+++
@@ -8,7 +8,7 @@
render() {
return (
<div class="main">
- {React.cloneElement(this.props.children, this.props)}
+ {this.props.children}
</div>
);
} |
cc198c4dfaab6ec7203e9a68d4436f76d8508773 | elements/BodyRoutes.jsx | elements/BodyRoutes.jsx | 'use strict';
var _ = require('lodash');
var React = require('react');
var Router = require('react-router');
var Route = Router.Route;
var SiteIndex = require('./SiteIndex.jsx');
var Page = require('./Page.jsx');
var config = require('config');
var themeHandlers = require('theme').handlers;
var configHandlers = config... | 'use strict';
var _ = require('lodash');
var React = require('react');
var Router = require('react-router');
var Route = Router.Route;
var SiteIndex = require('./SiteIndex.jsx');
var Page = require('./Page.jsx');
var config = require('config');
var themeHandlers = require('theme').handlers;
var configHandlers = config... | Allow slash at the end of urls during development | Allow slash at the end of urls during development
| JSX | mit | antwarjs/antwar | ---
+++
@@ -25,8 +25,8 @@
<Route key={'root-' + i} name={k} handler={SectionIndex} />,
];
})}
- <Route key='item-route' name='item' path=':item' handler={Page} />
- <Route key='item-with-nesting-route' name='itemWithNesting' path='*/:item' handler={Page} />
+ <Route key='item-route' name... |
eb2f91382cd91d3a90afbf873a31b1e9dfa351ef | src/client/modules/subscription/index.web.jsx | src/client/modules/subscription/index.web.jsx | import React from 'react';
import { Route, NavLink } from 'react-router-dom';
import { MenuItem } from '../../modules/common/components/web';
import Subscription from './containers/Subscription';
import SubscribersOnly from './containers/SubscribersOnly';
import UpdateCard from './containers/UpdateCard';
import { Subs... | import React from 'react';
import { Route, NavLink } from 'react-router-dom';
import { MenuItem } from '../../modules/common/components/web';
import Subscription from './containers/Subscription';
import SubscribersOnly from './containers/SubscribersOnly';
import UpdateCard from './containers/UpdateCard';
import { Subs... | Remove subscriptions UI elements if disabled | Remove subscriptions UI elements if disabled
| JSX | mit | sysgears/apollo-universal-starter-kit,sysgears/apollo-fullstack-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit | ---
+++
@@ -7,22 +7,27 @@
import UpdateCard from './containers/UpdateCard';
import { SubscriberRoute } from './containers/Auth';
import reducers from './reducers';
+import settings from '../../../../settings';
import Feature from '../connector';
export default new Feature({
- route: [
- <Route exact path... |
2356841ef747623755322980a15986bd9944ab68 | app/javascript/tagging/components/tag.jsx | app/javascript/tagging/components/tag.jsx | import * as React from 'react';
import PropTypes from 'prop-types';
import './tag.scss';
class Tag extends React.Component {
handleClick = () => this.props.onTagDeleteClick(this.props.tagCategory, this.props.tagValue);
render() {
return (
<li key={`${this.props.tagCategory}: ${this.props.tagValue}`}>
... | import * as React from 'react';
import PropTypes from 'prop-types';
import './tag.scss';
const Tag = ({
onTagDeleteClick, tagCategory, tagValue, srOnly,
}) => (
<li key={`${tagCategory}: ${tagValue}`}>
<span className="label label-info">
{tagCategory}: {tagValue}
<a
onClick={(e) => { e.prev... | Make Tag component const function | Make Tag component const function
| JSX | apache-2.0 | ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic | ---
+++
@@ -2,28 +2,33 @@
import PropTypes from 'prop-types';
import './tag.scss';
-class Tag extends React.Component {
- handleClick = () => this.props.onTagDeleteClick(this.props.tagCategory, this.props.tagValue);
-
- render() {
- return (
- <li key={`${this.props.tagCategory}: ${this.props.tagValue}`... |
2f8b01c584d799644789bded9b0dc11245be8e78 | apps/public/src/containers/Rules/List.jsx | apps/public/src/containers/Rules/List.jsx | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import { Typography } from '@material-ui/core';
import { Article, ArticleContent, ArticleMedia, Markdown } from 'components';
const List = ({ event }) => (
<Article isLoading={ !event }>
<ArticleContent>
... | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import { CardContent } from '@material-ui/core';
import { Article, ArticleCardHeader, Markdown } from 'components';
const List = ({ event }) => (
<Article>
<ArticleCardHeader title={ `${event.name} - Pravidla`... | Use refactored Article in Rules | Use refactored Article in Rules
| JSX | mit | tumido/malenovska,tumido/malenovska | ---
+++
@@ -2,17 +2,16 @@
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
-import { Typography } from '@material-ui/core';
+import { CardContent } from '@material-ui/core';
-import { Article, ArticleContent, ArticleMedia, Markdown } from 'components';
+import { Article, ArticleCardHea... |
b0101fe4f96e3d56496b3b86ab599820928aa51f | src/containers/error-boundary.jsx | src/containers/error-boundary.jsx | import React from 'react';
import PropTypes from 'prop-types';
import platform from 'platform';
import BrowserModalComponent from '../components/browser-modal/browser-modal.jsx';
import CrashMessageComponent from '../components/crash-message/crash-message.jsx';
import log from '../lib/log.js';
import analytics from '..... | import React from 'react';
import PropTypes from 'prop-types';
import platform from 'platform';
import BrowserModalComponent from '../components/browser-modal/browser-modal.jsx';
import CrashMessageComponent from '../components/crash-message/crash-message.jsx';
import log from '../lib/log.js';
import analytics from '..... | Fix reload button on error page so that it goes to the correct url (including the pathname). | Fix reload button on error page so that it goes to the correct url (including the pathname).
| JSX | bsd-3-clause | cwillisf/scratch-gui,cwillisf/scratch-gui,cwillisf/scratch-gui,LLK/scratch-gui,LLK/scratch-gui | ---
+++
@@ -30,7 +30,7 @@
}
handleReload () {
- window.location.replace(window.location.origin);
+ window.location.replace(window.location.origin + window.location.pathname);
}
render () { |
a1542d48cf9115ba91977b406979d14760d6ca93 | client/lobbies/map-thumbnail.jsx | client/lobbies/map-thumbnail.jsx | import React from 'react'
const BASE_URL = '/thumbs/'
export default class MapThumbnail extends React.Component {
static propTypes = {
className: React.PropTypes.string,
map: React.PropTypes.object.isRequired,
};
render() {
const { className, map } = this.props
const firstByte = map.hash.subst... | import React from 'react'
import { makeServerUrl } from '../network/server-url'
const BASE_URL = '/thumbs/'
export default class MapThumbnail extends React.Component {
static propTypes = {
className: React.PropTypes.string,
map: React.PropTypes.object.isRequired,
};
render() {
const { className, ma... | Use proper URLs for map thumbnails in electron. | Use proper URLs for map thumbnails in electron.
| JSX | mit | ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery | ---
+++
@@ -1,4 +1,5 @@
import React from 'react'
+import { makeServerUrl } from '../network/server-url'
const BASE_URL = '/thumbs/'
@@ -13,7 +14,8 @@
const firstByte = map.hash.substr(0, 2)
const secondByte = map.hash.substr(2, 2)
- const url = `${BASE_URL}${firstByte}/${secondByte}/${map.hash}.... |
1d63e39a00e237cfc9a225b117a463540740873b | app/assets/javascripts/components/features/getting_started/index.jsx | app/assets/javascripts/components/features/getting_started/index.jsx | import Column from '../ui/components/column';
const GettingStarted = () => {
return (
<Column>
<div className='static-content'>
<h1>Getting started</h1>
<p>Mastodon is still in development and one of the lacking areas at the moment is user discovery.</p>
<p>You can follow people if ... | import Column from '../ui/components/column';
import { Link } from 'react-router';
const GettingStarted = () => {
return (
<Column>
<div className='static-content'>
<h1>Getting started</h1>
<p>Mastodon is still in development and one of the lacking areas at the moment is user discovery.</... | Add link to public timeline to getting started screen | Add link to public timeline to getting started screen
| JSX | agpl-3.0 | kibousoft/mastodon,kibousoft/mastodon,kibousoft/mastodon,kibousoft/mastodon | ---
+++
@@ -1,4 +1,5 @@
-import Column from '../ui/components/column';
+import Column from '../ui/components/column';
+import { Link } from 'react-router';
const GettingStarted = () => {
return (
@@ -9,6 +10,7 @@
<p>You can follow people if you know their username and the domain they are on by enteri... |
14dfc3ba1615a9bd65e76df125d14e88c45871df | src/components/post-likes.jsx | src/components/post-likes.jsx | import React from 'react'
import UserName from './user-name'
import {preventDefault} from '../utils'
const renderLike = (user) => (
<li className="p-timeline-user-like" key={user.id}>
<UserName user={user}/>
<span>, </span>
</li>
)
const renderLastLike = (user, omittedLikes = 0, showMoreLikes = null)... | import React from 'react'
import UserName from './user-name'
import {preventDefault} from '../utils'
const renderLike = (item, i, items) => (
<li key={item.id}>
{item.id !== 'more-likes' ? (
<UserName user={item}/>
) : (
<a onClick={preventDefault(item.showMoreLikes)}>{item.omittedLikes} other p... | Implement proper "and" in the list of likes | Implement proper "and" in the list of likes
| JSX | mit | davidmz/freefeed-react-client,ujenjt/freefeed-react-client,clbn/freefeed-gamma,kadmil/freefeed-react-client,FreeFeed/freefeed-html-react,FreeFeed/freefeed-html-react,ujenjt/freefeed-react-client,FreeFeed/freefeed-react-client,kadmil/freefeed-react-client,kadmil/freefeed-react-client,clbn/freefeed-gamma,davidmz/freefeed... | ---
+++
@@ -3,45 +3,45 @@
import UserName from './user-name'
import {preventDefault} from '../utils'
-const renderLike = (user) => (
- <li className="p-timeline-user-like" key={user.id}>
- <UserName user={user}/>
- <span>, </span>
- </li>
-)
+const renderLike = (item, i, items) => (
+ <li key={item.i... |
e5874d54d2e07e8f0d93f55680cb6c56dfea2b10 | src/frontend/Components/PrivateMembers.jsx | src/frontend/Components/PrivateMembers.jsx | import React from 'react';
import Avatar from '@material-ui/core/Avatar';
import List from '@material-ui/core/List';
import ListItem from '@material-ui/core/ListItem';
import ListItemText from '@material-ui/core/ListItemText';
import ConfirmModal from 'Components/ConfirmModal';
import FA from 'react-fontawesome';
expo... | import React from 'react';
import Avatar from '@material-ui/core/Avatar';
import List from '@material-ui/core/List';
import ListItem from '@material-ui/core/ListItem';
import ListItemText from '@material-ui/core/ListItemText';
import ConfirmModal from 'Components/ConfirmModal';
import FA from 'react-fontawesome';
expo... | Adjust key on private members as well | Adjust key on private members as well
| JSX | mit | uwwebservices/idcard-webapp-poc,uwwebservices/idcard-webapp-poc | ---
+++
@@ -20,11 +20,9 @@
}
render() {
const listItems = this.props.members.map(mem => {
-
+ let memberKey = (mem.UWNetID || mem.identifier || Math.random().toString(36));
return (
- <ListItem
- key={(mem.UWNetID || mem.identifi... |
32cd0aef497cbd78784f5ecdbcccebc124cd1602 | src/router.jsx | src/router.jsx | import React from 'react';
import { Route, Redirect, useLocation } from 'react-router-dom';
import { App } from 'layout/app';
import { PageHome } from 'layout/page-home';
import { PageSearchQuestionnaire } from 'layout/page-search-questionnaire';
import { PageQuestionnaire } from 'layout/page-questionnaire';
import { ... | import React from 'react';
import { Route, Redirect, useLocation, Switch } from 'react-router-dom';
import { App } from 'layout/app';
import { PageHome } from 'layout/page-home';
import { PageSearchQuestionnaire } from 'layout/page-search-questionnaire';
import { PageQuestionnaire } from 'layout/page-questionnaire';
i... | Add Switch to Router to avoid redirect on refresh | Add Switch to Router to avoid redirect on refresh
| JSX | mit | InseeFr/Pogues,InseeFr/Pogues,InseeFr/Pogues | ---
+++
@@ -1,5 +1,5 @@
import React from 'react';
-import { Route, Redirect, useLocation } from 'react-router-dom';
+import { Route, Redirect, useLocation, Switch } from 'react-router-dom';
import { App } from 'layout/app';
import { PageHome } from 'layout/page-home';
@@ -11,18 +11,20 @@
const { pathname } =... |
b5ea9d5aa818cc5997cf7e46eeda8219c9068e88 | src/client/components/Chip/index.jsx | src/client/components/Chip/index.jsx | import React from 'react'
import styled from 'styled-components'
import PropTypes from 'prop-types'
import { GREY_3 } from 'govuk-colours'
import { SPACING } from '@govuk-react/constants'
const StyledSpan = styled('span')`
display: inline-block;
padding: 12px;
margin: 4px;
background-color: ${GREY_3};
border... | import styled from 'styled-components'
import { GREY_3 } from 'govuk-colours'
import { SPACING } from '@govuk-react/constants'
const Chip = styled('span')`
display: inline-block;
padding: 12px;
margin: 4px;
background-color: ${GREY_3};
border-radius: ${SPACING.SCALE_2};
`
export default Chip
| Remove explicit ref to return jsx with children | Remove explicit ref to return jsx with children
| JSX | mit | uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-frontend | ---
+++
@@ -1,10 +1,8 @@
-import React from 'react'
import styled from 'styled-components'
-import PropTypes from 'prop-types'
import { GREY_3 } from 'govuk-colours'
import { SPACING } from '@govuk-react/constants'
-const StyledSpan = styled('span')`
+const Chip = styled('span')`
display: inline-block;
pad... |
0441c4b50430c85df07d628340cf0663315409b9 | src/resources/assets/js/reusable/system-messages.jsx | src/resources/assets/js/reusable/system-messages.jsx | import Immutable from 'immutable'
import PropTypes from 'prop-types'
import React, { PureComponent } from 'react'
import SimpleMarkdown from 'simple-markdown'
import { Alert } from './ui_basic'
/**
* simple SystemMessages class for the overarching system messages.
*
* This is a 'pure' component which expects data ... | import Immutable from 'immutable'
import PropTypes from 'prop-types'
import React, { PureComponent } from 'react'
import SimpleMarkdown from 'simple-markdown'
import { Alert } from './ui_basic'
/**
* simple SystemMessages class for the overarching system messages.
*
* This is a 'pure' component which expects data ... | Fix undefined error in prod | Fix undefined error in prod
| JSX | bsd-3-clause | rlorenzo/tmlpstats,rlorenzo/tmlpstats,tmlpstats/tmlpstats,tmlpstats/tmlpstats,rlorenzo/tmlpstats,tmlpstats/tmlpstats,rlorenzo/tmlpstats,tmlpstats/tmlpstats,rlorenzo/tmlpstats | ---
+++
@@ -21,17 +21,16 @@
return <span></span>
}
- let items = messages.map((message) => {
+ let items = []
+ messages.forEach((message) => {
+ if (message.dismissed) {
+ return
+ }
const parsed = SimpleMarkdown.defaultBl... |
717931b1e78330362cb5e8e74157c9c7be67bbc1 | shared/components/locale-select.jsx | shared/components/locale-select.jsx | /** @jsx React.DOM */
/* global React */
export default React.createClass({
displayName: 'LocaleSelect',
handleChange: function (e) {
this.props.onLocaleChange(e.target.value);
},
render: function () {
return (
<select className="locale-select"
value={this.... | /** @jsx React.DOM */
/* global React */
export default React.createClass({
displayName: 'LocaleSelect',
handleChange: function (e) {
this.props.onLocaleChange(e.target.value);
},
render: function () {
var currentLocale = this.props.currentLocale;
if (Array.isArray(currentLoc... | Support array for currentLocale in LocaleSelect | Support array for currentLocale in LocaleSelect
| JSX | bsd-3-clause | okuryu/formatjs-site,ericf/formatjs-site,ericf/formatjs-site | ---
+++
@@ -9,9 +9,15 @@
},
render: function () {
+ var currentLocale = this.props.currentLocale;
+
+ if (Array.isArray(currentLocale)) {
+ currentLocale = currentLocale[0];
+ }
+
return (
<select className="locale-select"
- value={this.... |
922d22397727ea796dafedcf359d942d153902a4 | src/operator/visitors/visitor/invite_button.jsx | src/operator/visitors/visitor/invite_button.jsx | import React from 'react';
export default React.createClass({
propTypes: {
isInvited: React.PropTypes.bool.isRequired
},
render() {
if (this.props.isInvited) {
return null;
}
return <a onClick={this.props.onClick}>invite</a>;
}
});
| import React from 'react';
export default class InviteButton extends React.Component {
render() {
if (this.props.isInvited) {
return null;
}
return <a onClick={this.props.onClick}>invite</a>;
}
};
InviteButton.propTypes = {
isInvited: React.PropTypes.bool.isRequired
};... | Convert <InviteButton /> to ES6 class | Convert <InviteButton /> to ES6 class | JSX | apache-2.0 | JustBlackBird/mibew-ui,JustBlackBird/mibew-ui | ---
+++
@@ -1,10 +1,6 @@
import React from 'react';
-export default React.createClass({
- propTypes: {
- isInvited: React.PropTypes.bool.isRequired
- },
-
+export default class InviteButton extends React.Component {
render() {
if (this.props.isInvited) {
return null;
@@ -12,... |
49d35541b20076756d54c00a84323477be391559 | React-Todo/app/api/TodoAPI.jsx | React-Todo/app/api/TodoAPI.jsx | import $ from 'jquery';
module.exports = {
setTasks: function (tasks) {
if(!$.isArray(tasks)) {
return;
}
localStorage.setItem('tasks', JSON.stringify(tasks));
return tasks;
},
getTasks: function () {
let strTasks = localStorage.getItem('tasks'),
tasks;
try {
tasks... | import $ from 'jQuery';
module.exports = {
setTasks: function (tasks) {
if(!$.isArray(tasks)) {
return;
}
localStorage.setItem('tasks', JSON.stringify(tasks));
return tasks;
},
getTasks: function () {
let strTasks = localStorage.getItem('tasks'),
tasks;
try {
tasks... | Change name of jquery to jQuery for the benefit of Karma | Change name of jquery to jQuery for the benefit of Karma
| JSX | mit | JulianNicholls/Complete-React-Web-App,JulianNicholls/Complete-React-Web-App | ---
+++
@@ -1,4 +1,4 @@
-import $ from 'jquery';
+import $ from 'jQuery';
module.exports = {
setTasks: function (tasks) { |
4e8149473991ffb014fcf2e72148b032f6fee285 | src/client/views/layouts/login-layout.jsx | src/client/views/layouts/login-layout.jsx | LoginLayout = React.createClass({
mixins: [ReactMeteorData],
getMeteorData() {
var handleUserPoints = Meteor.subscribe("userPoints");
var pointEntries = UserPoints.find({
username: Meteor.user().services.github.username
}, {
sort: {
createdAt: -1
}
}).fetch();
var poi... | LoginLayout = React.createClass({
mixins: [ReactMeteorData],
getMeteorData() {
var handleUserPoints = Meteor.subscribe("userPoints");
var points = 0;
if ( Meteor.user() ) {
var pointEntries = UserPoints.find({
username: Meteor.user().services.github.username
}, {
sort: {
... | Fix login layout for not logged in users | Fix login layout for not logged in users
| JSX | mit | meteor-phoenix/global-hackathon,meteor-phoenix/global-hackathon | ---
+++
@@ -2,23 +2,24 @@
mixins: [ReactMeteorData],
getMeteorData() {
var handleUserPoints = Meteor.subscribe("userPoints");
-
- var pointEntries = UserPoints.find({
- username: Meteor.user().services.github.username
- }, {
- sort: {
- createdAt: -1
- }
- }).fetch();
-
... |
8823349027e6be903b5e4aeba77cf57b2ee6a509 | src/app/appRoutes.jsx | src/app/appRoutes.jsx | import React from 'react';
import { Router, Route } from 'react-router';
import createBrowserHistory from 'history/lib/createBrowserHistory';
import AppRoot from './components/AppRoot.jsx';
import About from './components/About.jsx';
import NoMatch from './components/NoMatch.jsx';
class AppRoutes extends React.Compon... | import React from 'react';
import { Router, Route, browserHistory } from 'react-router';
import AppRoot from './components/AppRoot.jsx';
import About from './components/About.jsx';
import NoMatch from './components/NoMatch.jsx';
class AppRoutes extends React.Component {
render () {
console.log(this.props.stat... | Fix probelm of outdated `history` | Fix probelm of outdated `history`
| JSX | mit | wwsun/starter-node-react,wwsun/starter-node-react | ---
+++
@@ -1,6 +1,5 @@
import React from 'react';
-import { Router, Route } from 'react-router';
-import createBrowserHistory from 'history/lib/createBrowserHistory';
+import { Router, Route, browserHistory } from 'react-router';
import AppRoot from './components/AppRoot.jsx';
import About from './components/Ab... |
2502ede7857a13aad5d850d9e40f6af4b5bfdadf | src/js/popup/components/DomainItem.react.jsx | src/js/popup/components/DomainItem.react.jsx | import React from 'react';
import PropTypes from 'prop-types';
export default class DomainItem extends React.Component {
constructor(props) {
super(props);
this.deleteDomain = this.deleteDomain.bind(this);
this.state = {
domain: this.props.domain || '',
};
}
/*
* Handles onClick event ... | import React from 'react';
import PropTypes from 'prop-types';
export default class DomainItem extends React.Component {
constructor(props) {
super(props);
this.deleteDomain = this.deleteDomain.bind(this);
this.state = {
domain: this.props.domain || '',
};
}
/*
* Handles onClick event ... | Fix lint errors for DomainItem component | Fix lint errors for DomainItem component
| JSX | mit | williamgrosset/fokus,williamgrosset/fokus,williamgrosset/fokus | ---
+++
@@ -35,8 +35,13 @@
{uiDomain}
</div>
<div>
- <input type='image' id='domain-delete' style={{ float: 'right' }} src='/png/garbage_can_16.png'
- onClick={this.deleteDomain} alt='Delete'
+ <input
+ type='image'
+ id='domain-delete'
... |
f27ac3fa9336e538548d0e623c56ab37ecfdedee | src/utilities/ScreenClassContext/index.jsx | src/utilities/ScreenClassContext/index.jsx | /* global window */
import React, { PureComponent } from 'react';
import throttle from 'lodash/throttle';
import PropTypes from 'prop-types';
import { getScreenClass } from '../../utils';
import { getConfiguration } from '../../config';
export const ScreenClassContext = React.createContext();
export default class Sc... | /* global window */
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { getScreenClass } from '../../utils';
import { getConfiguration } from '../../config';
export const ScreenClassContext = React.createContext();
export default class ScreenClassProvider extends PureComponent ... | Remove throttle to improve resize performance. | Remove throttle to improve resize performance.
| JSX | isc | JSxMachina/react-grid-system,zoover/react-grid-system,zoover/react-grid-system | ---
+++
@@ -1,7 +1,6 @@
/* global window */
import React, { PureComponent } from 'react';
-import throttle from 'lodash/throttle';
import PropTypes from 'prop-types';
import { getScreenClass } from '../../utils';
import { getConfiguration } from '../../config';
@@ -21,33 +20,30 @@
};
this.setScreen... |
9149338854b281f230581b696198eb94e7a2fe94 | 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 Link = require("react-router").Link;
var CenteredInlineDialogComponent = require("./CenteredInlineDialogComponent");
var PageNotFoundComponent = React.createClass({
displayName: "PageNotFoundComponent",
contextTypes: {
router: React.PropTypes.func
},
render: funct... | Replace 404 error with inline dialog | Replace 404 error with inline dialog
| JSX | apache-2.0 | cribalik/marathon-ui,cribalik/marathon-ui,mesosphere/marathon-ui,mesosphere/marathon-ui | ---
+++
@@ -1,4 +1,6 @@
var React = require("react/addons");
+var Link = require("react-router").Link;
+var CenteredInlineDialogComponent = require("./CenteredInlineDialogComponent");
var PageNotFoundComponent = React.createClass({
displayName: "PageNotFoundComponent",
@@ -11,12 +13,12 @@
var path = this.... |
0b59f234d46f735ce78b36b1a71a4b103ed8453c | frontend/src/components/OfferFilter.react.jsx | frontend/src/components/OfferFilter.react.jsx | import React from 'react';
import {TextInput} from 'belle';
import _ from 'lodash';
export default class OfferFilter extends React.Component {
static propTypes = {
onFilterUpdate: React.PropTypes.func.isRequired
}
updateFilter({value}) {
_.debounce(() => {
this.props.onFilterUpdate(value);
},... | import React from 'react';
import {TextInput, ComboBox, Option} from 'belle';
import Radium from 'radium';
import _ from 'lodash';
@Radium
export default class OfferFilter extends React.Component {
static propTypes = {
cities: React.PropTypes.array.isRequired,
currentCity: React.PropTypes.string,
onFi... | Add a select box to select cities and filter with it | Add a select box to select cities and filter with it
| JSX | agpl-3.0 | jilljenn/voyageavecmoi,jilljenn/voyageavecmoi,jilljenn/voyageavecmoi | ---
+++
@@ -1,25 +1,67 @@
import React from 'react';
-import {TextInput} from 'belle';
+import {TextInput, ComboBox, Option} from 'belle';
+import Radium from 'radium';
+
import _ from 'lodash';
+
+@Radium
export default class OfferFilter extends React.Component {
static propTypes = {
- onFilterUpdate: R... |
88a855048366dd4b2e2e03dc0a255e71b05744c2 | client/src/components/AddItemForm.jsx | client/src/components/AddItemForm.jsx | import React from 'react';
import axios from 'axios';
class AddItemForm extends React.Component {
constructor(props) {
super(props);
this.state = {
name: '',
notes: '',
houseId: this.props.houseId
};
}
postItem(obj) {
axios.post('/add', obj)
.then(res => console.log('Suc... | import React from 'react';
import axios from 'axios';
import { Card, CardText } from 'material-ui/Card';
import TextField from 'material-ui/TextField';
import RaisedButton from 'material-ui/RaisedButton';
class AddItemForm extends React.Component {
constructor(props) {
super(props);
this.state = {
nam... | Change form to Card with TextFields | Change form to Card with TextFields
| JSX | mit | SentinelsOfMagic/SentinelsOfMagic | ---
+++
@@ -1,5 +1,8 @@
import React from 'react';
import axios from 'axios';
+import { Card, CardText } from 'material-ui/Card';
+import TextField from 'material-ui/TextField';
+import RaisedButton from 'material-ui/RaisedButton';
class AddItemForm extends React.Component {
constructor(props) {
@@ -36,13 +39... |
96e41acf19c14c0642ccb36dcc254438142b9bd3 | src/app/components/score.jsx | src/app/components/score.jsx | import React from 'react';
export default class Score extends React.Component {
setModifier() {
const val = Math.floor(this.props.value / 2 - 5);
let operator = '';
if (val !== 0) {
if (val > 0) {
operator = '+';
} else {
operator = '-';
}
}
return [' (', opera... | import React from 'react';
export default class Score extends React.Component {
setModifier() {
const val = Math.floor(this.props.value / 2 - 5);
let operator = val > 0 ? '+' : '';
return [' (', operator, val, ')'].join('');
}
render() {
return (
<span>
{this.props.value + this.set... | Modify module based on test results | Modify module based on test results
| JSX | mit | jkrayer/summoner,jkrayer/summoner | ---
+++
@@ -3,15 +3,7 @@
export default class Score extends React.Component {
setModifier() {
const val = Math.floor(this.props.value / 2 - 5);
- let operator = '';
-
- if (val !== 0) {
- if (val > 0) {
- operator = '+';
- } else {
- operator = '-';
- }
- }
+ let oper... |
591479981e2b2a0577cf613d909bd67597dbcf3c | src/frontend/Components/RegistrationModal.jsx | src/frontend/Components/RegistrationModal.jsx | import React from 'react';
import ContentModal from 'Components/ContentModal';
class RegistrationModal extends React.Component {
constructor(props) {
super(props);
this.state = {
showLogout: false
};
}
backToConfig() {
if (process.env.NODE_ENV !== 'development') {
window.location = '/... | import React from 'react';
import ContentModal from 'Components/ContentModal';
class RegistrationModal extends React.Component {
constructor(props) {
super(props);
this.state = {
showLogout: false
};
}
render() {
let modalOpts = {
openWithButton: true,
dialogTitle: 'Start Regist... | Remove the login/redirect on back button | Remove the login/redirect on back button
| JSX | mit | uwwebservices/idcard-webapp-poc,uwwebservices/idcard-webapp-poc | ---
+++
@@ -8,11 +8,6 @@
showLogout: false
};
}
- backToConfig() {
- if (process.env.NODE_ENV !== 'development') {
- window.location = '/login?returnUrl=/config';
- }
- }
render() {
let modalOpts = {
openWithButton: true,
@@ -21,7 +16,6 @@
approveButtonText: 'Start Re... |
d15cc009efa6074ffded7bd58aae03b7166a99f5 | web/static/js/components/Project.jsx | web/static/js/components/Project.jsx | import React from "react"
import { connect } from "react-redux"
import { bindActionCreators } from "redux"
import { deleteProject } from "../actions/actionsCreators"
import Cell from "./Cell"
const Project = React.createClass({
handleDeleteClick(event) {
event.preventDefault()
this.props.deleteProject(thi... | import React from "react"
import { connect } from "react-redux"
import { bindActionCreators } from "redux"
import { deleteProject } from "../actions/actionsCreators"
import Cell from "./Cell"
const Project = React.createClass({
handleDeleteClick(event) {
event.preventDefault()
if (confirm("Do you really w... | Add a confirmation before deleting a project | Add a confirmation before deleting a project
| JSX | mit | michaelbaudino/basedef,michaelbaudino/basedef | ---
+++
@@ -9,7 +9,9 @@
const Project = React.createClass({
handleDeleteClick(event) {
event.preventDefault()
- this.props.deleteProject(this.props.channel, this.props.project)
+ if (confirm("Do you really want to delete project \"" + this.props.project.name + "\"?")) {
+ this.props.deleteProject(... |
fc5906f53bda276a538234cb1bf8ba3233bc00a8 | client/components/Nav.jsx | client/components/Nav.jsx | import React from 'react';
import { Link } from 'react-router';
export default class Nav extends React.Component {
constructor(props) {
super(props);
this.state = {
showText: false,
};
}
handleClick() {
this.setState({
showText: true,
});
}
render() {
return (
<div... | import React from 'react';
import { Link } from 'react-router';
export default class Nav extends React.Component {
constructor(props) {
super(props);
this.state = {
showText: false,
};
}
handleClick() {
this.setState({
showText: true,
});
}
render() {
return (
<div... | Clean up code and spacing | Clean up code and spacing
| JSX | mit | nonchalantkettle/SpeechDoctor,alexxisroxxanne/SpeechDoctor,alexxisroxxanne/SpeechDoctor,nonchalantkettle/SpeechDoctor | ---
+++
@@ -18,14 +18,14 @@
render() {
return (
<div>
-
- { this.props.onLandingPage ? <Link to="profile">Profile</Link> :
- <div>
- <Link to="/">Home</Link>
- <Link to="text">TextView</Link>
- <Link to="speech">Speech</Link>
- <Link to="profile">Profil... |
cb15b13c925db22399e646f48bbdf0016e9dc79b | app/javascript/BuiltInFormControls/GraphQLAsyncSelect.jsx | app/javascript/BuiltInFormControls/GraphQLAsyncSelect.jsx | import React from 'react';
import PropTypes from 'prop-types';
import { withApollo } from 'react-apollo';
import AsyncSelect from 'react-select/lib/Async';
class GraphQLAsyncSelect extends React.Component {
static propTypes = {
client: PropTypes.shape({
query: PropTypes.func.isRequired,
}).isRequired,
... | import React from 'react';
import PropTypes from 'prop-types';
import { withApollo } from 'react-apollo';
import AsyncSelect from 'react-select/async';
class GraphQLAsyncSelect extends React.Component {
static propTypes = {
client: PropTypes.shape({
query: PropTypes.func.isRequired,
}).isRequired,
... | Fix import for AsyncSelect for react-select 3.0 | Fix import for AsyncSelect for react-select 3.0
| JSX | mit | neinteractiveliterature/intercode,neinteractiveliterature/intercode,neinteractiveliterature/intercode,neinteractiveliterature/intercode,neinteractiveliterature/intercode | ---
+++
@@ -1,7 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import { withApollo } from 'react-apollo';
-import AsyncSelect from 'react-select/lib/Async';
+import AsyncSelect from 'react-select/async';
class GraphQLAsyncSelect extends React.Component {
static propTypes = { |
74b72f83693ac92589a9dc1da0b511a4d5b175ce | js/pages/App.react.jsx | js/pages/App.react.jsx | 'use strict';
var React = require('react');
var SessionStore = require('../stores/SessionStore');
function _getState() {
return {
session: SessionStore.getSession()
};
}
function _onChange(store, callback) {
var stateChange = {};
stateChange[store] = callback();
this.setState(stateChange);
}
var App ... | 'use strict';
var React = require('react');
var SessionStore = require('../stores/SessionStore');
function _getState() {
return {
session: SessionStore.getSession()
};
}
function _onChange(store, callback) {
var stateChange = {};
stateChange[store] = callback();
this.setState(stateChange);
}
var App ... | Fix propagation of session as property | Fix propagation of session as property
| JSX | mit | mapster/tdl-frontend | ---
+++
@@ -31,7 +31,7 @@
render: function() {
return (
<div className='container'>
- {this.props.children}
+ {React.cloneElement(this.props.children, {session: this.state.session})}
</div>
);
} |
ccddd1971d18c798359564da497e8113cd814c90 | packages/lesswrong/components/common/AnalyticsTracker.jsx | packages/lesswrong/components/common/AnalyticsTracker.jsx | import { registerComponent } from 'meteor/vulcan:core';
import React from 'react';
import { useTracking } from "../../lib/analyticsEvents";
const AnalyticsTracker = ({eventType, eventProps, children, captureOnClick, captureOnMount, skip}) => {
const { captureEvent } = useTracking({eventType, eventProps, captureOnMou... | import { registerComponent } from 'meteor/vulcan:core';
import React from 'react';
import { useTracking } from "../../lib/analyticsEvents";
const AnalyticsTracker = ({eventType, eventProps, children, captureOnClick, captureOnMount, skip}) => {
const { captureEvent } = useTracking({eventType, eventProps, captureOnMou... | Add tracking for which button is clicked. | Add tracking for which button is clicked.
| JSX | mit | Discordius/Lesswrong2,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2 | ---
+++
@@ -4,8 +4,21 @@
const AnalyticsTracker = ({eventType, eventProps, children, captureOnClick, captureOnMount, skip}) => {
const { captureEvent } = useTracking({eventType, eventProps, captureOnMount})
- const handleClick = () => {
- !skip && captureOnClick && captureEvent(`${eventType}Clicked`, eventP... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.