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 |
|---|---|---|---|---|---|---|---|---|---|---|
7faf44701ed8801e7f70490aaf69c4225036dae9 | app/scripts/views/home.jsx | app/scripts/views/home.jsx | import React from 'react';
import Countdown from "../components/countdown.jsx";
import About from "../components/about.jsx";
export default class Login extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div>
<Countdown/>
... | import React from 'react';
import Login from './login.jsx';
import Countdown from "../components/countdown.jsx";
import About from "../components/about.jsx";
export default class Home extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div>
... | Fix class name and add login component | Fix class name and add login component
| JSX | mit | benct/tomlin-web,benct/tomlin-web | ---
+++
@@ -1,8 +1,9 @@
import React from 'react';
+import Login from './login.jsx';
import Countdown from "../components/countdown.jsx";
import About from "../components/about.jsx";
-export default class Login extends React.Component {
+export default class Home extends React.Component {
constructor(props)... |
4e745820554f6c51201aa25f720ef446941fb3e0 | components/Tabs.jsx | components/Tabs.jsx | var React = require('react/addons');
var Component = require('../component');
module.exports = Component({
name: 'Tabs',
getDefaultProps() {
return {
type: 'text'
};
},
render() {
var { children, type, ...props } = this.props;
if (type)
this.addStyles(this.styles[type]);
ret... | var React = require('react/addons');
var Component = require('../component');
var clone = require('../lib/niceClone');
module.exports = Component({
name: 'Tabs',
getDefaultProps() {
return {
type: 'text'
};
},
render() {
var { children, type, ...props } = this.props;
if (type)
th... | Move tabs to use niceClone | Move tabs to use niceClone
| JSX | mit | zenlambda/reapp-ui,Lupino/reapp-ui,zackp30/reapp-ui,srounce/reapp-ui,reapp/reapp-ui,jhopper28/reapp-ui,oToUC/reapp-ui | ---
+++
@@ -1,5 +1,6 @@
var React = require('react/addons');
var Component = require('../component');
+var clone = require('../lib/niceClone');
module.exports = Component({
name: 'Tabs',
@@ -18,12 +19,7 @@
return (
<ul {...props} {...this.componentProps()}>
- {React.Children.map(children,... |
8b4c168b7734918b17660ae34b0cc9f136872bcf | src/pages/home.jsx | src/pages/home.jsx | import React from 'react';
import Header from '../components/header.jsx';
export default class Home extends React.Component {
constructor(props) {
super(props);
this.onClickButton = this.onClickButton.bind(this);
this.state = {
counter: 0
};
}
onClickButton () {
this.setState({ count... | import React from 'react';
import Header from '../components/header.jsx';
export default class Home extends React.Component {
constructor(props) {
super(props);
this.onClickButton = this.onClickButton.bind(this);
this.state = {
counter: 0
};
}
onClickButton () {
this.setState({ count... | Add noscript tag with a message | Add noscript tag with a message
| JSX | mit | Juan1ll0/es6-react-server-side-render,Juan1ll0/es6-react-server-side-render | ---
+++
@@ -26,6 +26,7 @@
<main>
<button onClick={this.onClickButton}>Click ME!!!</button>
<span> {this.state.counter} Clicks</span>
+ <p><noscript><strong>You don't have Javascript enabled in your browser</strong></noscript></p>
</main>
<script sr... |
8b35b2e01733a35d2f5dc606c52f7200b4b82fb4 | src/main.jsx | src/main.jsx | import 'babel-polyfill'
import './styles/main'
import React from 'react'
import { render } from 'react-dom'
import { Provider } from 'react-redux'
import { createStore, applyMiddleware } from 'redux'
import thunkMiddleware from 'redux-thunk'
import createLogger from 'redux-logger'
import { Router, hashHistory } from ... | import 'babel-polyfill'
import './styles/main'
import React from 'react'
import { render } from 'react-dom'
import { Provider } from 'react-redux'
import { createStore, applyMiddleware } from 'redux'
import thunkMiddleware from 'redux-thunk'
import createLogger from 'redux-logger'
import { Router, hashHistory } from ... | Use protocol-relative url in cozy.init() | [styles] Use protocol-relative url in cozy.init()
| JSX | agpl-3.0 | enguerran/cozy-files-v3,cozy/cozy-files-v3,enguerran/cozy-files-v3,nono/cozy-files-v3,y-lohse/cozy-drive,nono/cozy-files-v3,enguerran/cozy-drive,goldoraf/cozy-drive,y-lohse/cozy-drive,goldoraf/cozy-drive,cozy/cozy-files-v3,cozy/cozy-files-v3,nono/cozy-photos-v3,goldoraf/cozy-drive,nono/cozy-photos-v3,enguerran/cozy-dri... | ---
+++
@@ -35,7 +35,7 @@
const applicationElement = document.querySelector('[role=application]')
cozy.init({
- cozyURL: `${document.location.protocol}//${applicationElement.dataset.cozyStack}`,
+ cozyURL: `//${applicationElement.dataset.cozyStack}`,
token: applicationElement.dataset.token
})
|
81d228fbc95bced2469137b4ade16589491f3868 | dist/js/checkbox.jsx | dist/js/checkbox.jsx | /**
* @jsx React.DOM
*/
var React = require('react'),
Classable = require('./mixins/classable.js');
var Checkbox = React.createClass({
propTypes: {
name: React.PropTypes.string.isRequired,
value: React.PropTypes.string.isRequired,
onCheck: React.PropTypes.func,
checked: React.PropTypes.bool
... | /**
* @jsx React.DOM
*/
var React = require('react'),
Classable = require('./mixins/classable.js');
var Checkbox = React.createClass({
propTypes: {
name: React.PropTypes.string.isRequired,
value: React.PropTypes.string.isRequired,
onCheck: React.PropTypes.func,
checked: React.PropTypes.bool
... | Update to latest from docs branch | Update to latest from docs branch
| JSX | mit | milworm/material-ui,Qix-/material-ui,WolfspiritM/material-ui,b4456609/pet-new,jacobrosenthal/material-ui,sarink/material-ui-with-sass,Joker666/material-ui,dsslimshaddy/material-ui,JonatanGarciaClavo/material-ui,garth/material-ui,AndriusBil/material-ui,ianwcarlson/material-ui,oliviertassinari/material-ui,tingi/material-... | ---
+++
@@ -28,7 +28,7 @@
},
componentWillReceiveProps: function(nextProps) {
- this.setState({checked: nextProps.checked || false});
+ if (nextProps.hasOwnProperty('checked')) this.setState({checked: nextProps.checked});
},
check: function() { |
4a46159c0a9b1391cd7f588546e74b85105aa522 | src/editor/toolBar/undoredoControls.jsx | src/editor/toolBar/undoredoControls.jsx | import React, {Component} from 'react';
import {Icon} from "antd"
class UndoRedo extends Component {
constructor(props) {
super(props);
}
render() {
let className = 'RichEditor-styleButton';
return (
<div className="RichEditor-controls">
<span className='RichEditor-styleButton' onClick=... | import React, {Component} from 'react';
import {Icon} from "antd"
class UndoRedo extends Component {
constructor(props) {
super(props);
}
render() {
let className = 'RichEditor-styleButton';
return (
<div className="RichEditor-controls">
<span className='RichEditor-styleButton' onClick=... | Add title tip text of redo and undo. | :apple: Add title tip text of redo and undo.
| JSX | mit | WHKFZYX-Tool/react-lz-editor-whkfzyx,leejaen/react-lz-editor,WHKFZYX-Tool/react-lz-editor-whkfzyx,leejaen/react-lz-editor,WHKFZYX-Tool/react-lz-editor-whkfzyx,leejaen/react-lz-editor | ---
+++
@@ -9,10 +9,10 @@
let className = 'RichEditor-styleButton';
return (
<div className="RichEditor-controls">
- <span className='RichEditor-styleButton' onClick={()=>this.props.onToggle("undo")}>
+ <span className='RichEditor-styleButton' onClick={()=>this.props.onToggle("undo")} t... |
fa3d6dc708d8a2524a5fdab843866245700da9b6 | src/request/components/request-entry-item-view.jsx | src/request/components/request-entry-item-view.jsx | var React = require('react'),
Timeago = require('../../lib/components/timeago.jsx');
module.exports = React.createClass({
render: function() {
var entry = this.props.entry;
return (
<div className="request-entry-item-holder">
<table className="table table-bordered">
... | var React = require('react'),
Timeago = require('../../lib/components/timeago.jsx');
module.exports = React.createClass({
render: function() {
var entry = this.props.entry;
return (
<div className="request-entry-item-holder">
<table className="table table-bordered">
... | Add username to the record list so that its easy to tell filtering is working | Add username to the record list so that its easy to tell filtering is working
| JSX | unknown | avanderhoorn/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,avanderhoorn/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype | ---
+++
@@ -8,13 +8,14 @@
<div className="request-entry-item-holder">
<table className="table table-bordered">
<tr>
- <td rowSpan="2">{entry.duration}ms</td>
+ <td>{entry.duration}ms</td>
<td colS... |
8b0c1d6f6a40a049c1787ae5da9d1d9aa9211024 | app/components/cardscontainer/cardscontainer.jsx | app/components/cardscontainer/cardscontainer.jsx | 'use strict';
import React from 'react';
import axios from 'axios';
import Card from './card/Card.jsx';
import Mydiet from './mydiet/Mydiet.jsx';
const MyDietItem = [];
const Cardhome = React.createClass({
handleAddDiet: function(info) {
console.log(info);
MyDietItem.push({
'id': info... | 'use strict';
import React from 'react';
import axios from 'axios';
import Card from './card/Card.jsx';
import Mydiet from './mydiet/Mydiet.jsx';
const MyDietItem = [];
const Cardhome = React.createClass({
handleAddDiet: function(info) {
// console.log(info);
var apiurl = 'http://api.cs50.net/foo... | Return data from home cards | Return data from home cards
| JSX | mit | p4suhag/gabru,p4suhag/gabru | ---
+++
@@ -9,13 +9,32 @@
const Cardhome = React.createClass({
handleAddDiet: function(info) {
- console.log(info);
+ // console.log(info);
+ var apiurl = 'http://api.cs50.net/food/3/facts?key=64b1434ce52fd6e5ee55f01f7d0ae3f0';
+ var proxyurl = 'https://cors-anywhere.herokuapp.com/... |
2a228ae6b9e80e0d85f16200269378a0ab8d3f80 | ui/src/reducers.jsx | ui/src/reducers.jsx | import { combineReducers } from 'redux';
import { reducer as api } from 'redux-json-api';
import reduceReducers from 'reduce-reducers';
import queryString from 'query-string';
const generateRaceAttributes = (state, action) => {
let newState = state;
switch (action.type) {
case 'API_READ':
const [paramS... | import { combineReducers } from 'redux';
import { reducer as api } from 'redux-json-api';
import reduceReducers from 'reduce-reducers';
import queryString from 'query-string';
const buildIncludeMap = (state, action) => {
let newState = state;
switch (action.type) {
case 'API_READ':
const paramStr = act... | Rename and fix buildIncludeMap reducer | Rename and fix buildIncludeMap reducer
| JSX | apache-2.0 | jimbobhickville/swd6,jimbobhickville/swd6,jimbobhickville/swd6 | ---
+++
@@ -4,12 +4,12 @@
import queryString from 'query-string';
-const generateRaceAttributes = (state, action) => {
+const buildIncludeMap = (state, action) => {
let newState = state;
switch (action.type) {
case 'API_READ':
- const [paramStr] = action.payload.endpoint.split('?');
+ cons... |
88131a3a884e8bfc4ecb766c715f0ba67b320ead | client/src/index.jsx | client/src/index.jsx | import React from 'react';
import { render } from 'react-dom';
import { Router, Route, IndexRoute, browserHistory } from 'react-router';
import injectTapEventPlugin from 'react-tap-event-plugin';
import App from './components/App';
import LandingPage from './components/LandingPage';
import Login from './components/Log... | import React from 'react';
import { render } from 'react-dom';
import { Router, Route, IndexRoute, browserHistory } from 'react-router';
import injectTapEventPlugin from 'react-tap-event-plugin';
import App from './components/App';
import LandingPage from './components/LandingPage';
import Login from './components/Log... | Add route for react router for createorjoin component | Add route for react router for createorjoin component
| JSX | mit | NerdDiffer/reprise,NerdDiffer/reprise,NerdDiffer/reprise | ---
+++
@@ -9,6 +9,7 @@
import Signup from './components/Signup';
import JamRoom from './components/JamRoom';
import Room from './components/Room';
+import CreateOrJoin from './components/CreateOrJoin';
import Invalid from './components/Invalid';
import Metronome from './components/Metronome';
@@ -23,6 +24,7 @... |
aa66e1e9b51b962dec5c0dcd0cb76a90e045f552 | src/IssueFilter.jsx | src/IssueFilter.jsx | import React from 'react';
export default class IssueFilter extends React.Component {
render() {
return (
<div>This is a placeholder for the Issue Filter.</div>
);
}
}
| import React from 'react';
export default class IssueFilter extends React.Component { // eslint-disable-line
render() {
return (
<div>This is a placeholder for the Issue Filter.</div>
);
}
}
| Add exception for component stateless error | Add exception for component stateless error
| JSX | mit | seanlinxs/issue-tracker,seanlinxs/issue-tracker | ---
+++
@@ -1,6 +1,6 @@
import React from 'react';
-export default class IssueFilter extends React.Component {
+export default class IssueFilter extends React.Component { // eslint-disable-line
render() {
return (
<div>This is a placeholder for the Issue Filter.</div> |
9bfdf7a665e18a381e045760d4d2431b818bbb37 | src/editor-page.jsx | src/editor-page.jsx | /** @jsx React.DOM */
(function(Perseus) {
var ItemEditor = Perseus.ItemEditor;
var ItemRenderer = Perseus.ItemRenderer;
var CombinedHintsEditor = Perseus.CombinedHintsEditor;
Perseus.EditorPage = React.createClass({
render: function() {
return <div id="perseus" className="framework-perseus">
... | /** @jsx React.DOM */
(function(Perseus) {
var ItemEditor = Perseus.ItemEditor;
var ItemRenderer = Perseus.ItemRenderer;
var CombinedHintsEditor = Perseus.CombinedHintsEditor;
Perseus.EditorPage = React.createClass({
render: function() {
return <div id="perseus" className="framework-perseus">
... | Add onChange prop to EditorPage. | Add onChange prop to EditorPage.
Used for the perseus manifesto.
Test Plan:
Sorry for vagueness. Successfully used this to update perseus one with
an unsaved indicator whenever the question changes.
Auditors: alpert
| JSX | mit | daukantas/perseus,daukantas/perseus,ariabuckles/perseus,junyiacademy/perseus,huangins/perseus,learningequality/perseus,abe4mvp/perseus,ariabuckles/perseus,chirilo/perseus,iamchenxin/perseus,iamchenxin/perseus,huangins/perseus,chirilo/perseus,abe4mvp/perseus,alexristich/perseus,sachgits/perseus,junyiacademy/perseus,sach... | ---
+++
@@ -6,15 +6,15 @@
var CombinedHintsEditor = Perseus.CombinedHintsEditor;
Perseus.EditorPage = React.createClass({
-
+
render: function() {
return <div id="perseus" className="framework-perseus">
- <ItemEditor
+ <ItemEditor
ref="itemEditor"
... |
ab7b0ec22385e62203d16e02c8be1f763c61d6ed | src/widgets/component-new-edit/components/response-format/table/input-measure.jsx | src/widgets/component-new-edit/components/response-format/table/input-measure.jsx | import React from 'react';
import { Field } from 'redux-form';
import PropTypes from 'prop-types';
import { InputWithVariableAutoCompletion } from 'forms/controls/control-with-suggestions';
import { SelectorView, View } from 'widgets/selector-view';
import ResponseFormatSimple from '../simple/response-format-simple';
... | import React from 'react';
import { Field } from 'redux-form';
import PropTypes from 'prop-types';
import { RichTextareaWithVariableAutoCompletion } from 'forms/controls/control-with-suggestions';
import {toolbarConfigTooltip} from "forms/controls/rich-textarea";
import { SelectorView, View } from 'widgets/selector-vi... | Change Measure Label input to Rich Textarea | Change Measure Label input to Rich Textarea
| JSX | mit | InseeFr/Pogues,InseeFr/Pogues,InseeFr/Pogues | ---
+++
@@ -2,7 +2,8 @@
import { Field } from 'redux-form';
import PropTypes from 'prop-types';
-import { InputWithVariableAutoCompletion } from 'forms/controls/control-with-suggestions';
+import { RichTextareaWithVariableAutoCompletion } from 'forms/controls/control-with-suggestions';
+import {toolbarConfigToolt... |
77183f11944e7dd47c89df1b277ecdbe9070a17a | src/Menu/SubheaderMenuItem.jsx | src/Menu/SubheaderMenuItem.jsx | import React from 'react';
import PropTypes from 'prop-types';
import ThemeService from '../styles/ChamelThemeService';
const SubheaderMenuItem = (props) => {
let theme = ThemeService.defaultTheme.menu;
return (
<div key={props.index} className={theme.menuSubheader}>{props.text}</div>
);
}
SubheaderMenuItem... | import React from 'react';
import PropTypes from 'prop-types';
import ThemeService from '../styles/ChamelThemeService';
const SubheaderMenuItem = (props, context) => {
const theme = (context.chamelTheme && context.chamelTheme.menu)
? context.chamelTheme.menu : ThemeService.defaultTheme.menu;
return (
<div... | Update the way of calling the ThemeService | Update the way of calling the ThemeService
| JSX | mit | skystebnicki/chamel,skystebnicki/chamel | ---
+++
@@ -2,8 +2,10 @@
import PropTypes from 'prop-types';
import ThemeService from '../styles/ChamelThemeService';
-const SubheaderMenuItem = (props) => {
- let theme = ThemeService.defaultTheme.menu;
+const SubheaderMenuItem = (props, context) => {
+ const theme = (context.chamelTheme && context.chamelTheme... |
637f668f7b90a7c5f6f792c08b32689ac7779f78 | examplePlugin/src/js/components/ExamplePluginComponent.jsx | examplePlugin/src/js/components/ExamplePluginComponent.jsx | import React from "react/addons";
import ExamplePluginStore from "../stores/ExamplePluginStore";
import ExamplePluginEvents from "../events/ExamplePluginEvents";
var {PluginActions, PluginHelper} =
global.MarathonUIPluginAPI;
var ExamplePluginComponent = React.createClass({
getInitialState: function () {
re... | import React from "react/addons";
import ExamplePluginStore from "../stores/ExamplePluginStore";
import ExamplePluginEvents from "../events/ExamplePluginEvents";
var {PluginActions, PluginHelper} =
global.MarathonUIPluginAPI;
var ExamplePluginComponent = React.createClass({
getInitialState: function () {
re... | Fix small bug in examplePlugin :D | Fix small bug in examplePlugin :D | JSX | apache-2.0 | mesosphere/marathon-ui,cribalik/marathon-ui,cribalik/marathon-ui,mesosphere/marathon-ui | ---
+++
@@ -10,7 +10,7 @@
getInitialState: function () {
return {
- appsCount: 0
+ appsCount: ExamplePluginStore.apps.length
};
},
|
70c1f8c2a3b1f09ea4eb0a4a8a46e31f906e1972 | src/furniture/components/listingFurnitureRow.component.jsx | src/furniture/components/listingFurnitureRow.component.jsx | import React from 'react';
import UpdateFurnitureFormTable from '../containers/updateFurnitureFormTable.container.jsx';
export default function listingFurnitureRow(props) {
const { roomName, furnitureName, furnitureObj } = props.data;
function controlsClick(e, type) {
// todo: Convert this to a switch-object... | import React from 'react';
import UpdateFurnitureFormTable from '../containers/updateFurnitureFormTable.container.jsx';
export default function listingFurnitureRow(props) {
const { roomName, furnitureName, furnitureObj } = props.data;
function controlsClick(e, type) {
const status = {
edit: true,
... | Replace bulky if/else block with a switch object | refactor(frontend): Replace bulky if/else block with a switch object
| JSX | mit | Nailed-it/Designify,Nailed-it/Designify | ---
+++
@@ -5,15 +5,12 @@
const { roomName, furnitureName, furnitureObj } = props.data;
function controlsClick(e, type) {
- // todo: Convert this to a switch-object. Or refactor otherwise; it's looking like it
- // hardly does anything, and maybe could just be done inline or something.
- if (type ===... |
b9a1e30e00cab33157388c065da2369af09376ff | client/views/readouts/transmission_delay_readout.jsx | client/views/readouts/transmission_delay_readout.jsx | import Moment from "moment";
import "moment-duration-format";
import React from "react";
import ListeningView from "../listening_view.js";
class TransmissionDelayReadout extends ListeningView {
componentDidMount() {
super.componentDidMount();
window.setInterval(() => {this.forceUpdate();}, 1000);
}
re... | import Moment from "moment";
import "moment-duration-format";
import React from "react";
import ListeningView from "../listening_view.js";
class TransmissionDelayReadout extends ListeningView {
componentDidMount() {
super.componentDidMount();
window.setInterval(() => {this.forceUpdate();}, 1000);
}
re... | Add temporary workaround for delay display in current prod outage. | Add temporary workaround for delay display in current prod outage.
| JSX | mit | sensedata/space-telemetry,sensedata/space-telemetry | ---
+++
@@ -13,6 +13,9 @@
render() {
const unixTime = this.state.data ? this.state.data.t : 0;
+ if (typeof unixTime === "undefined") {
+ return <span className="time-alarm">-</span>;
+ }
const time = Moment.unix(unixTime).utc();
const now = Moment().utc();
const delta = now.diff(t... |
d5f6fa974651704555d57e44e2387432067603a6 | src/request/components/request-session-list-view.jsx | src/request/components/request-session-list-view.jsx | var React = require('react'),
SessionItem = require('./request-session-item-view.js');
function getSessionState() {
return {
allSessions: sessionStore.getAll()
};
};
module.exports = React.createClass({
render: function() {
var allSessions = this.props.allSessions;
var sessions... | var React = require('react'),
SessionItem = require('./request-session-item-view.js');
module.exports = React.createClass({
render: function() {
var allSessions = this.props.allSessions;
var sessions = [];
for (var key in allSessions) {
sessions.push(<SessionItem key={key} ses... | Remove unused code from session list | Remove unused code from session list
| JSX | unknown | Glimpse/Glimpse.Client.Prototype,avanderhoorn/Glimpse.Client.Prototype,avanderhoorn/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype | ---
+++
@@ -1,11 +1,5 @@
var React = require('react'),
SessionItem = require('./request-session-item-view.js');
-
-function getSessionState() {
- return {
- allSessions: sessionStore.getAll()
- };
-};
module.exports = React.createClass({
render: function() { |
2f0a52da9815964099b89d155161e5c6a9b77ef0 | src/field/social/ask_social_network.jsx | src/field/social/ask_social_network.jsx | import React from 'react';
import Screen from '../../core/screen';
import SocialButtonsPane from './social_buttons_pane';
import { renderSignedInConfirmation } from '../../core/signed_in_confirmation';
const Component = ({i18n, model, t}) => (
<SocialButtonsPane
labelFn={i18n.str}
lock={model}
showLoadin... | import React from 'react';
import Screen from '../../core/screen';
import SocialButtonsPane from './social_buttons_pane';
import { renderSignedInConfirmation } from '../../core/signed_in_confirmation';
const Component = ({i18n, model}) => (
<SocialButtonsPane
instructions={i18n.html("socialLoginInstructions")}
... | Use i18n prop instead of t in AskSocialNetwork | Use i18n prop instead of t in AskSocialNetwork
| JSX | mit | mike-casas/lock,mike-casas/lock,mike-casas/lock | ---
+++
@@ -3,13 +3,13 @@
import SocialButtonsPane from './social_buttons_pane';
import { renderSignedInConfirmation } from '../../core/signed_in_confirmation';
-const Component = ({i18n, model, t}) => (
+const Component = ({i18n, model}) => (
<SocialButtonsPane
+ instructions={i18n.html("socialLoginInstruc... |
ced164c8710cb017638c2f56509c238dd9f4e038 | client/app/bundles/DenpaioApp/components/AppLayout.jsx | client/app/bundles/DenpaioApp/components/AppLayout.jsx | import React from 'react';
import SearchBar from './SearchBar';
import DanmakuBar from './DanmakuBar';
export default class AppLayout extends React.Component {
constructor(props) {
super(props);
this.state = {};
}
handleSearch = (keyword) => {
this.setState({ keyword });
this.props.router.push(`... | import React from 'react';
import SearchBar from './SearchBar';
import DanmakuBar from './DanmakuBar';
export default class AppLayout extends React.Component {
constructor(props) {
super(props);
this.state = {};
}
currentStyle() {
let pathname = this.props.location.pathname;
let defaultStyle = {... | Add background color to non-index pages | Add background color to non-index pages
| JSX | mit | denpaio/denpaio,denpaio/denpaio,denpaio/denpaio,denpaio/denpaio | ---
+++
@@ -6,6 +6,14 @@
constructor(props) {
super(props);
this.state = {};
+ }
+
+ currentStyle() {
+ let pathname = this.props.location.pathname;
+ let defaultStyle = {
+ backgroundColor: 'rgba(0, 0, 0, 0.4)'
+ };
+ return pathname === '/' ? {} : defaultStyle;
}
handleSearch... |
3331f34d193317b3440a497566f79cdce06b3034 | src/client/render.jsx | src/client/render.jsx | import React from 'react';
import {render as renderToDom} from 'react-dom';
import {Provider} from 'react-redux';
import {ReduxAsyncConnect} from 'redux-connect';
import {Router, browserHistory} from 'react-router';
import {syncHistoryWithStore} from 'react-router-redux';
function render(configureStore, createRoutes, ... | import React from 'react';
import {render as renderToDom} from 'react-dom';
import {Provider} from 'react-redux';
import {ReduxAsyncConnect} from 'redux-connect';
import {Router, browserHistory, applyRouterMiddleware} from 'react-router';
import {syncHistoryWithStore} from 'react-router-redux';
function render(configu... | Add support for router middleware | Add support for router middleware
| JSX | mit | andy-shea/react-cornerstone | ---
+++
@@ -2,16 +2,18 @@
import {render as renderToDom} from 'react-dom';
import {Provider} from 'react-redux';
import {ReduxAsyncConnect} from 'redux-connect';
-import {Router, browserHistory} from 'react-router';
+import {Router, browserHistory, applyRouterMiddleware} from 'react-router';
import {syncHistoryWi... |
0dc68b3385427a9bdb57631bd84cc70f0cf3b8f6 | imports/ui/structure-view/element-tree/element-tree.jsx | imports/ui/structure-view/element-tree/element-tree.jsx | import React, { PropTypes } from 'react';
import { createContainer } from 'meteor/react-meteor-data';
import Elements from '../../../api/elements/elements.js';
import Element from './element.jsx';
import AddElementButton from './add-element-button.jsx';
import { Panel } from 'react-bootstrap';
const elementTreeHeader ... | import React, { PropTypes } from 'react';
import { createContainer } from 'meteor/react-meteor-data';
import Elements from '../../../api/elements/elements.js';
import Element from './element.jsx';
import AddElementButton from './add-element-button.jsx';
import { Panel } from 'react-bootstrap';
const elementTreeHeader ... | Add title to element tree and move plus button to the right | Add title to element tree and move plus button to the right
| JSX | mit | minden/data-furnace,minden/data-furnace | ---
+++
@@ -6,9 +6,14 @@
import { Panel } from 'react-bootstrap';
const elementTreeHeader = () => (
- <AddElementButton
- possibleTypeNames={['dimension']}
- />
+ <div>
+ Elements
+ <div className="pull-right">
+ <AddElementButton
+ possibleTypeNames={['dimension']}
+ />
+ </div>
+... |
4411ae6cc79111e683735a9fb24c360fd47d5a7b | src/components/ClocketteApp.jsx | src/components/ClocketteApp.jsx | 'use strict';
import React from 'react';
// CSS
import 'normalize.css';
import 'styles/main.css';
const ClocketteApp = React.createClass({
render() {
return (
<p>It's working!</p>
);
}
});
export default ClocketteApp;
| 'use strict';
import React from 'react';
import { RouteHandler } from 'react-router';
import 'normalize.css';
import 'styles/main.css';
const ClocketteApp = React.createClass({
getInitialState() {
this.interval = null;
return {
ts: Date.now()
};
},
componentDidMount() {
this.interval ... | Add routeHandler in App, application global timestamp state + interval to refresh it naively (so far) | Add routeHandler in App, application global timestamp state + interval to refresh it naively (so far)
| JSX | mit | rhumlover/clockette,rhumlover/clockette | ---
+++
@@ -1,17 +1,40 @@
'use strict';
import React from 'react';
+import { RouteHandler } from 'react-router';
-// CSS
import 'normalize.css';
import 'styles/main.css';
+
const ClocketteApp = React.createClass({
+
+ getInitialState() {
+ this.interval = null;
+
+ return {
+ ts: Date.now()
+ ... |
5a96465b5ee54e61351c5e46f7fc98a10c2c51bf | src/components/Sidebar/InfoTab.jsx | src/components/Sidebar/InfoTab.jsx | import React from 'react';
import './Sidebar.scss';
import baseTab from './BaseTab';
function InfoTab() {
return (
<div>
<section>
<p className="info-paragraph">
Freesound Explorer is a visual interface for exploring Freesound content
in a 2-dimensional space and for creating mu... | import React from 'react';
import './Sidebar.scss';
import baseTab from './BaseTab';
function InfoTab() {
return (
<div>
<section>
<p className="info-paragraph">
Freesound Explorer is a visual interface for exploring Freesound content
in a 2-dimensional space and create music at... | Update text in about sidebar tab | Update text in about sidebar tab
| JSX | mit | ffont/freesound-explorer,ffont/freesound-explorer,ffont/freesound-explorer | ---
+++
@@ -8,20 +8,20 @@
<section>
<p className="info-paragraph">
Freesound Explorer is a visual interface for exploring Freesound content
- in a 2-dimensional space and for creating music :)
+ in a 2-dimensional space and create music at the same time :)
</p>
... |
2ffddf16ff34ad7beaeef555fca94edd030d8aac | app/assets/javascripts/components/tickets/tickets_table_row.jsx | app/assets/javascripts/components/tickets/tickets_table_row.jsx | import React from 'react';
import { Link } from 'react-router-dom';
import { STATUSES } from './util';
import TicketStatusHandler from './ticket_status_handler';
import TicketOwnerHandler from './ticket_owner_handler';
const TicketsTableRow = ({ ticket }) => {
const { sender, sender_email } = ticket;
const senderN... | import React from 'react';
import { Link } from 'react-router-dom';
import { STATUSES } from './util';
import TicketStatusHandler from './ticket_status_handler';
import TicketOwnerHandler from './ticket_owner_handler';
const TicketsTableRow = ({ ticket }) => {
const { sender, sender_email } = ticket;
const senderN... | Replace underscores in ticket subjects, for better linebreaks | Replace underscores in ticket subjects, for better linebreaks
| JSX | mit | WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard | ---
+++
@@ -14,7 +14,7 @@
{senderName || 'Unknown User Record' }
</td>
<td className="w15">
- {ticket.subject}
+ {ticket.subject && ticket.subject.replace(/_/g, ' ')}
</td>
<td className="w25">
{ |
15b7aa0a4c57f9720516911d231e0a8d800516de | demo/src/demo_app.jsx | demo/src/demo_app.jsx | /**
* Created by Aaron on 12/21/2015.
*/
import * as React from 'react';
import ReCaptcha from '../../';
class DemoApp extends React.Component {
render() {
return (
<div>
<h1>react-recaptcha2 Demo App</h1>
<h3>Explicit Rendering</h3>
<ReCaptc... | /**
* Created by Aaron on 12/21/2015.
*/
import * as React from 'react';
import ReCaptcha from '../../';
const gh_pages_key = "6LfKmBMTAAAAAEEk10iOxbp11HWyhq1v_jGdyyOA";
class DemoApp extends React.Component {
render() {
return (
<div>
<h1>react-recaptcha2 Demo App</h1>
... | Add new key for gh-pages | Add new key for gh-pages
| JSX | mit | novacrazy/react-recaptcha2,novacrazy/react-recaptcha2 | ---
+++
@@ -6,6 +6,8 @@
import ReCaptcha from '../../';
+const gh_pages_key = "6LfKmBMTAAAAAEEk10iOxbp11HWyhq1v_jGdyyOA";
+
class DemoApp extends React.Component {
render() {
return (
@@ -13,19 +15,19 @@
<h1>react-recaptcha2 Demo App</h1>
<h3>Explicit Rendering<... |
1167cc33efd371c7432f4d68a437e84080cc74e6 | app/assets/javascripts/relay/routes/board-route.react.jsx | app/assets/javascripts/relay/routes/board-route.react.jsx | var Relay = require('react-relay');
//var BoardRelayRoute = class extends Relay.Route {
// static queries = {
// board: () => Relay.QL`query { board }`,
// };
// static routeName = 'BoardHomeRoute';
//};
//KAKAclass BoardRelayRoute extends Relay.Route {};
//KAKABoardRelayRoute.queries = {
//KAKA simple: () => ... | var Relay = require('react-relay');
var BoardRelayRoute = {
queries: {
simple: () => Relay.QL` query { simple } `,
},
params: {
},
name: 'BoardHomeRoute',
}
module.exports = BoardRelayRoute;
| Remove commented out code from route | Remove commented out code from route
| JSX | mit | nethsix/relay_on_rails,nethsix/relay-on-rails,nethsix/relay_on_rails,nethsix/relay-on-rails,nethsix/relay_on_rails,nethsix/relay-on-rails | ---
+++
@@ -1,25 +1,4 @@
var Relay = require('react-relay');
-//var BoardRelayRoute = class extends Relay.Route {
-// static queries = {
-// board: () => Relay.QL`query { board }`,
-// };
-// static routeName = 'BoardHomeRoute';
-//};
-//KAKAclass BoardRelayRoute extends Relay.Route {};
-//KAKABoardRelayRoute.... |
372ccb6741ba07dadeeebccc706434a7b20c5e23 | client/app/presentationals/components/shared/NavMenu.jsx | client/app/presentationals/components/shared/NavMenu.jsx | import React from 'react';
import PropTypes from 'prop-types';
import { Link } from 'react-router-dom';
function NavMenu(props) {
const menuItems = {
'/': 'Dashboard',
'/editor/slide': 'Slide editor',
'/signup': 'Sign up',
'/signin': 'Sign in',
};
return (
<header className={`c_nav-menu c_na... | import React from 'react';
import PropTypes from 'prop-types';
import { Link } from 'react-router-dom';
function NavMenu(props) {
const menuItems = {
'/': 'Dashboard',
'/editor/slide': 'Slide editor',
'/signup': 'Sign up',
'/signin': 'Sign in',
};
return (
<div className={`c_nav-menu c_nav-m... | Fix faulty use of header tag in nav menu. | Fix faulty use of header tag in nav menu.
| JSX | mit | OpenWebslides/OpenWebslides,OpenWebslides/OpenWebslides,OpenWebslides/OpenWebslides,OpenWebslides/OpenWebslides | ---
+++
@@ -11,7 +11,7 @@
};
return (
- <header className={`c_nav-menu c_nav-menu--${props.cssIdentifier}`}>
+ <div className={`c_nav-menu c_nav-menu--${props.cssIdentifier}`}>
<div className="c_nav-menu__wrapper">
<ul className="c_nav-menu__list">
{Object.keys(menuItems).map(... |
81e961f3f78a4fd270ec31dbcfcc0ba5eaeffa45 | web/static/js/components/remote_retro.jsx | web/static/js/components/remote_retro.jsx | import React, { Component, PropTypes } from "react"
import { Presence } from "phoenix"
import * as AppPropTypes from "../prop_types"
import Room from "./room"
const isFacilitator = currentPresence => {
if (currentPresence) {
return currentPresence.user.is_facilitator
}
return false
}
class RemoteRetro ext... | import React, { Component, PropTypes } from "react"
import { Presence } from "phoenix"
import * as AppPropTypes from "../prop_types"
import Room from "./room"
const isFacilitator = currentPresence => {
if (currentPresence) {
return currentPresence.user.is_facilitator
}
return false
}
class RemoteRetro ext... | Add handlers for retroChannel.js client's 'join' responses | Add handlers for retroChannel.js client's 'join' responses
| JSX | mit | samdec11/remote_retro,stride-nyc/remote_retro,tnewell5/remote_retro,stride-nyc/remote_retro,stride-nyc/remote_retro,tnewell5/remote_retro | ---
+++
@@ -23,6 +23,8 @@
componentWillMount() {
this.props.retroChannel.on("presence_state", presences => this.setState({ presences }))
this.props.retroChannel.join()
+ .receive("ok", () => console.log("RetroChannel joined"))
+ .receive("error", error => console.error(error))
}
render(... |
32551f6be560d27cd03641f7694c34768aaaa064 | app/scripts/pages/lobby.jsx | app/scripts/pages/lobby.jsx | import React from 'react';
import GameList from '../components/GameList.jsx';
import LobbyActions from '../actions/LobbyActions';
import LobbyStore from '../stores/LobbyStore';
class Lobby extends React.Component {
render() {
return (
<div>
<GameList />
</div>
);
}
}
export de... | import React from 'react';
import $ from 'jquery';
import GameList from '../components/GameList.jsx';
import LobbyActions from '../actions/LobbyActions';
import LobbyStore from '../stores/LobbyStore';
class Lobby extends React.Component {
validate() {
var redirect = '/auth/login?redirect=' + encodeURIComponen... | Add structure for auth validation | Add structure for auth validation
| JSX | mit | gnidan/foodtastechess-client,gnidan/foodtastechess-client | ---
+++
@@ -1,4 +1,5 @@
import React from 'react';
+import $ from 'jquery';
import GameList from '../components/GameList.jsx';
import LobbyActions from '../actions/LobbyActions';
@@ -6,7 +7,23 @@
class Lobby extends React.Component {
+ validate() {
+
+ var redirect = '/auth/login?redirect=' + encodeURIC... |
04ed67d8aa13e15bed669b24d09ff86ef531be3e | src/frontend/components/admin/GroupsList.jsx | src/frontend/components/admin/GroupsList.jsx | 'use strict';
import React from 'react';
import GroupListEntry from './GroupListEntry.jsx';
import AddGroupModalLauncher from './AddGroupModalLauncher.jsx';
export default ({ groups , selectedGroup, editable, onSave, onSelectGroup}) => {
let groupEntries = groups.map( group => (<GroupListEntry group={group} onSave... | 'use strict';
import React from 'react';
import GroupListEntry from './GroupListEntry.jsx';
import AddGroupModalLauncher from './AddGroupModalLauncher.jsx';
export default ({ groups , selectedGroup, editable, onSave, onSelectGroup}) => {
let groupEntries = groups.map( group => (<GroupListEntry key={group.id} group... | Add key property to group list to stop react complaining | Add key property to group list to stop react complaining
| JSX | agpl-3.0 | rabblerouser/core,rabblerouser/core,rabblerouser/core | ---
+++
@@ -4,7 +4,7 @@
import AddGroupModalLauncher from './AddGroupModalLauncher.jsx';
export default ({ groups , selectedGroup, editable, onSave, onSelectGroup}) => {
- let groupEntries = groups.map( group => (<GroupListEntry group={group} onSave={onSave} onSelect={onSelectGroup} />));
+ let groupEntries... |
fab692abff96eb032e7a7c58a0e7d996bc7305f5 | client/sections/conversations/components/Rooms.jsx | client/sections/conversations/components/Rooms.jsx | import React from 'react';
import Button from './Button.jsx';
import classNames from 'classnames';
const nameMaker = (users) => {
const last = users.length - 1;
return users
.map(user => `${user.firstName} ${user.lastName}`)
.reduce((names, currName, i) =>
names + (i === last ? ' & ' : ', ') + currName
)... | import React from 'react';
import Button from './Button.jsx';
import classNames from 'classnames';
const nameMaker = (users) => {
const last = users.length - 1;
return users
.map(user => `${user.firstName} ${user.lastName}`)
.reduce((names, currName, i) =>
names + (i === last ? ' & ' : ', ') + currName
)... | Comment out delete button in conversations | Comment out delete button in conversations
| JSX | mit | VictoriousResistance/iDioma,VictoriousResistance/iDioma | ---
+++
@@ -15,7 +15,7 @@
<a href="#" onClick={(e) => handleRoomChange(e, index)}>
<div className="room">
<div className="thread-name">{nameMaker(room.users)}</div>
- <Button label='Delete' type='action' clickHandler={(e) => roomDeleter(e, index, selfId, room.id)} />
+
</div>
</a>
);
@@ -... |
2917953b488bbb868f821c99998047c55b504086 | imports/ui/Task.jsx | imports/ui/Task.jsx | import React, {Component, PropTypes} from 'react';
// Task component - represents a single todo item
export default class Task extends Component {
render(){
return (
<li>{this.props.task.text}</li>
);
}
}
Task.propTypes = {
// This component gets the task to display through a React prop.
// We c... | import React, {Component, PropTypes} from 'react';
import { Tasks } from '../api/tasks.js';
// Task component - represents a single todo item
export default class Task extends Component {
toggleChecked() {
// Set the checked property to the opposite of its current value
Tasks.update(this.props.task._id, {
... | Add update and delete for tasks | Add update and delete for tasks
| JSX | mit | verdantred/simple-todo,verdantred/simple-todo | ---
+++
@@ -1,10 +1,40 @@
import React, {Component, PropTypes} from 'react';
+
+import { Tasks } from '../api/tasks.js';
// Task component - represents a single todo item
export default class Task extends Component {
+ toggleChecked() {
+ // Set the checked property to the opposite of its current value
+ ... |
c4b381ce1c058da07d12cade3ffa226b40069414 | app/assets/javascripts/components/search_container.es6.jsx | app/assets/javascripts/components/search_container.es6.jsx | class SearchContainer extends React.Component {
constructor(props) {
super(props)
this.state = { showDropdown: false, term: '', posts: [], users: [], tags: [] }
this.hideDropdown = this.hideDropdown.bind(this);
this.showDropdown = this.showDropdown.bind(this);
}
search(term) {
this.setState(... | class SearchContainer extends React.Component {
constructor(props) {
super(props)
this.state = { showDropdown: false, term: '', posts: [], users: [], tags: [] }
this.hideDropdown = this.hideDropdown.bind(this);
this.showDropdown = this.showDropdown.bind(this);
}
search(term) {
this.setState(... | Add temporary fix for search result dropdown | Add temporary fix for search result dropdown
| JSX | mit | aamin005/Firdowsspace,dev-warner/Revinyl-Product,kenny-hibino/stories,kenny-hibino/stories,aamin005/Firdowsspace,dev-warner/Revinyl-Product,dev-warner/Revinyl-Product,aamin005/Firdowsspace,kenny-hibino/stories | ---
+++
@@ -22,7 +22,7 @@
}
hideDropdown() {
- this.setState({ showDropdown: false });
+ setTimeout(() => { this.setState({ showDropdown: false }) }, 250); //FIXME: really hacky workaround.
}
showDropdown() { |
e2da0b5250fd990ef870aa06ec0390189abf93e2 | src/components/people-grid/people-grid.jsx | src/components/people-grid/people-grid.jsx | const classNames = require('classnames');
const omit = require('lodash.omit');
const PropTypes = require('prop-types');
const React = require('react');
const Avatar = require('../../components/avatar/avatar.jsx');
require('./people-grid.scss');
const PeopleGrid = props => (
<ul className="avatar-grid">
{p... | const PropTypes = require('prop-types');
const React = require('react');
const Avatar = require('../../components/avatar/avatar.jsx');
require('./people-grid.scss');
const PeopleGrid = props => (
<ul className="avatar-grid">
{props.people.map((person, index) => (
<li
className=... | Fix lint issues in people grid component | Fix lint issues in people grid component
| JSX | bsd-3-clause | LLK/scratch-www,LLK/scratch-www | ---
+++
@@ -1,5 +1,3 @@
-const classNames = require('classnames');
-const omit = require('lodash.omit');
const PropTypes = require('prop-types');
const React = require('react');
const Avatar = require('../../components/avatar/avatar.jsx');
@@ -39,9 +37,9 @@
PeopleGrid.propTypes = {
people: PropTypes.arrayO... |
65c24eb83273fae68548312d92eccc52884d161a | app/assets/javascripts/components/high_order/expandable.jsx | app/assets/javascripts/components/high_order/expandable.jsx | import React from 'react';
import createReactClass from 'create-react-class';
import UIActions from '../../actions/ui_actions.js';
import UIStore from '../../stores/ui_store.js';
const Expandable = function (Component) {
return createReactClass({
displayName: 'Expandable',
mixins: [UIStore.mixin],
getIn... | import React from 'react';
import createReactClass from 'create-react-class';
import { connect } from 'react-redux';
import { toggleUI, resetUI } from '../../actions';
const mapStateToProps = state => ({
openKey: state.ui.openKey
});
const mapDispatchToProps = {
toggleUI,
resetUI
};
const Expandable = function... | Convert Expandable component to redux | Convert Expandable component to redux
| JSX | mit | WikiEducationFoundation/WikiEduDashboard,alpha721/WikiEduDashboard,sejalkhatri/WikiEduDashboard,alpha721/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,sejalkhatri/WikiEduDashboard,sejalkhatri/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,sejalkhatri/WikiE... | ---
+++
@@ -1,26 +1,30 @@
import React from 'react';
import createReactClass from 'create-react-class';
-import UIActions from '../../actions/ui_actions.js';
-import UIStore from '../../stores/ui_store.js';
+import { connect } from 'react-redux';
+import { toggleUI, resetUI } from '../../actions';
+
+const mapState... |
70b31884ed01e705b35f6c333f29bc2ef9849023 | src/types/Checkbox.jsx | src/types/Checkbox.jsx | var React = require('react'), FieldMixin = require('../FieldMixin.jsx'), Constants = require('../Constants');
var Checkbox = React.createClass({
mixins: [FieldMixin],
statics: {
inputClassName: Constants.inputClassName
},
render() {
var className = Constants.clz(Checkbox.inputClassName... | var React = require('react'), FieldMixin = require('../FieldMixin.jsx'), Constants = require('../Constants');
var Checkbox = React.createClass({
mixins: [FieldMixin],
statics: {
inputClassName: Constants.inputClassName
},
doChange:function(e){
this.props.onValueChange(e.target.checked ... | Make checkbox true or false if no value is found | Make checkbox true or false if no value is found
| JSX | mit | subschema/subschema,pbarnes/subschema,subschema/subschema,pbarnes/subschema,redbadger/subschema,jspears/subschema,redbadger/subschema,Kikonejacob/subschema,jspears/subschema,bigdrum/subschema,martosource/subschema,martosource/subschema,bigdrum/subschema,jspears/subschema,Kikonejacob/subschema | ---
+++
@@ -6,9 +6,12 @@
statics: {
inputClassName: Constants.inputClassName
},
+ doChange:function(e){
+ this.props.onValueChange(e.target.checked ? this.props.value || true : null, this.state.value || false, this.props.name, this.props.path);
+ },
render() {
var classNa... |
db900e1f38271d10eadec070f1ed8797fded5609 | public/js/home.jsx | public/js/home.jsx | /* global React */
import SplashExample from './components/splash-example';
export default function init(state) {
var splashProps = Object.assign({}, state.intl, state.examples.splash);
var containerNode = document.querySelector('.splash-example-container');
// Expose React component on its DOM node fo... | /* global React */
import SplashExample from './components/splash-example';
export default function init(state) {
var splashProps = Object.assign({}, state.intl, state.examples.splash);
var containerNode = document.querySelector('.splash-example-container');
// Expose React component on its DOM node fo... | Fix refactor bug in Home init | Fix refactor bug in Home init
| JSX | bsd-3-clause | ericf/formatjs-site,ericf/formatjs-site | ---
+++
@@ -7,7 +7,7 @@
var containerNode = document.querySelector('.splash-example-container');
// Expose React component on its DOM node for testing.
- node.component = React.render(
+ containerNode.component = React.render(
<SplashExample {...splashProps} />,
containerNode
... |
8e186528b73c85b312f0a626252e1eec91f1fa66 | app/assets/javascripts/components/map-select.jsx | app/assets/javascripts/components/map-select.jsx | import PropTypes from 'prop-types'
import SelectMenu from './select-menu.jsx'
const MapSelect = function(props) {
const { selectedMapID, disabled, maps, onChange } = props
const selectedMap = maps.filter(m => m.id === selectedMapID)[0]
return (
<SelectMenu
items={maps}
disabled={disabled}
... | import PropTypes from 'prop-types'
import SelectMenu from './select-menu.jsx'
const MapSelect = function(props) {
const { selectedMapID, disabled, maps, onChange } = props
const selectedMap = maps.filter(m => m.id === selectedMapID)[0]
return (
<SelectMenu
items={maps}
disabled={disabled}
... | Handle long map names with ellipsis | Handle long map names with ellipsis
| JSX | mit | cheshire137/overwatch-team-comps,cheshire137/overwatch-team-comps,cheshire137/overwatch-team-comps | ---
+++
@@ -24,7 +24,7 @@
menuItemClass={map => `map-${map.slug}`}
menuItemContent={(map, isSelected) => (
<span className={isSelected ? 'with-selected' : ''}>
- {map.name}
+ <span className="css-truncate">{map.name}</span>
</span>
)}
/> |
1def054b2cd29da0d32b2afff58b3de4d49be3cd | webapp/src/components/select/ChartSelect.jsx | webapp/src/components/select/ChartSelect.jsx | import React, {Component, PropTypes} from 'react'
import Dropdown from 'components/select/Select'
import DropdownMenuItem from 'components/dropdown/DropdownMenuItem'
class ChartSelect extends Component {
static propTypes = {
charts: React.PropTypes.array.isRequired,
selected: React.PropTypes.object.isRequi... | import React, {Component, PropTypes} from 'react'
import Select from 'components/select/Select'
import DropdownMenuItem from 'components/dropdown/DropdownMenuItem'
class ChartSelect extends Component {
constructor (props) {
super(props)
this.state = {
pattern: ''
}
}
static propTypes = {
... | Add search functionality to chart selector | Add search functionality to chart selector
| JSX | agpl-3.0 | unicef/rhizome,unicef/rhizome,unicef/rhizome,unicef/rhizome | ---
+++
@@ -1,9 +1,16 @@
import React, {Component, PropTypes} from 'react'
-import Dropdown from 'components/select/Select'
+import Select from 'components/select/Select'
import DropdownMenuItem from 'components/dropdown/DropdownMenuItem'
class ChartSelect extends Component {
+
+ constructor (props) {
+ su... |
508203a69159e16bc8200bfd34bc178e00ca61cd | app/components/add-item/index.jsx | app/components/add-item/index.jsx | require("./add-item.styl")
import React from "react"
import {Button} from "react-bootstrap"
const ENTER_KEYCODE = 13;
export default class AddItem extends React.Component {
constructor() {
this.state = {
newItem: ""
}
}
updateNewItem(event) {
this.setState({
newItem: event.target.value... | require("./add-item.styl")
import React from "react"
import {Button} from "react-bootstrap"
const ENTER_KEYCODE = 13;
export default class AddItem extends React.Component {
constructor() {
this.state = {
newItem: ""
}
}
updateNewItem(event) {
this.setState({
newItem: event.target.value... | Resolve conflict between local and master | Resolve conflict between local and master
| JSX | unlicense | babadoozep/ema,babadoozep/ema | ---
+++
@@ -45,11 +45,7 @@
<input
type="text" value={this.state.newItem}
onChange={this.updateNewItem.bind(this)}
- onKeyUp={this.handleKeyUp.bind(this)}
- />
-
- <Button onClick={this.props.handleNextDay}>Done</Button>
- <Button onClick={this.props.revealActual}>Reveal<... |
13e47c67eea01a0a0ff58b45f94688cc8f8f10da | indico/modules/rb/client/js/common/timeline/TimelineHeader.jsx | indico/modules/rb/client/js/common/timeline/TimelineHeader.jsx | // This file is part of Indico.
// Copyright (C) 2002 - 2019 CERN
//
// Indico is free software; you can redistribute it and/or
// modify it under the terms of the MIT License; see the
// LICENSE file for more details.
import React from 'react';
import PropTypes from 'prop-types';
import TimelineLegend from './Timelin... | // This file is part of Indico.
// Copyright (C) 2002 - 2019 CERN
//
// Indico is free software; you can redistribute it and/or
// modify it under the terms of the MIT License; see the
// LICENSE file for more details.
import React from 'react';
import PropTypes from 'prop-types';
import {useResponsive} from 'indico/r... | Hide timeline header on mobile and portrait mode | Hide timeline header on mobile and portrait mode
| JSX | mit | mvidalgarcia/indico,ThiefMaster/indico,DirkHoffmann/indico,DirkHoffmann/indico,mic4ael/indico,OmeGak/indico,mvidalgarcia/indico,OmeGak/indico,pferreir/indico,OmeGak/indico,mic4ael/indico,pferreir/indico,ThiefMaster/indico,ThiefMaster/indico,mvidalgarcia/indico,pferreir/indico,mvidalgarcia/indico,indico/indico,indico/in... | ---
+++
@@ -7,35 +7,23 @@
import React from 'react';
import PropTypes from 'prop-types';
+import {useResponsive} from 'indico/react/util';
import TimelineLegend from './TimelineLegend';
import {legendLabelShape} from '../../props';
import DateNavigator from './DateNavigator';
-export default class TimelineHe... |
4f05336c4e428fd04c3594399d1bbd48215625ea | src/todos/components/todoInput.jsx | src/todos/components/todoInput.jsx | import React from 'react';
var ReactPropTypes = React.PropTypes;
import './todoInput.less';
const RETURN_KEY_CODE = 13;
export default class TodoInput extends React.Component {
constructor(props) {
super(props);
this.state = {
value: props.value || '',
};
}
create() {
this.props.createH... | import {default as React,
PropTypes as ReactPropTypes} from 'react';
import './todoInput.less';
const RETURN_KEY_CODE = 13;
export default class TodoInput extends React.Component {
constructor(props) {
super(props);
this.state = {
value: props.value || '',
};
}
create() {
this.p... | Refactor code to use `import` keyword only | Refactor code to use `import` keyword only
| JSX | mit | yejodido/webpack-todomvc,yejodido/webpack-todomvc | ---
+++
@@ -1,5 +1,5 @@
-import React from 'react';
-var ReactPropTypes = React.PropTypes;
+import {default as React,
+ PropTypes as ReactPropTypes} from 'react';
import './todoInput.less';
|
a0ff894802a132b0e2755f910b92a8b26cee9919 | src/form.jsx | src/form.jsx | var React = require("react");
var Form = React.createClass({
getInitialState: function() {
return {
url: ""
};
},
handleSubmit: function(e) {
e.preventDefault();
if (this.state.url == "") {
return;
}
Store.create(this.state.url);
this.setState({
url: "",
error... | 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;
}
Store.create(this.state.url);
this.se... | Fix bug that From requires Store | Fix bug that From requires Store
| JSX | mit | Sixeight/iwai,Sixeight/iwai,Sixeight/iwai | ---
+++
@@ -1,4 +1,5 @@
var React = require("react");
+var Store = require("./store.js");
var Form = React.createClass({
getInitialState: function() { |
834f252f3262e2c86d3e9f2e84aa4c66a53a793b | src/components/Navigation.jsx | src/components/Navigation.jsx | import React from 'react';
import { Link } from 'react-router';
export default class Navigation extends React.Component {
render() {
return (
<div>
<h1>{this.props.appName}</h1>
<ul>
<li><Link to="/">Home</Link></li>
<li><Link to="/page/0">Page 0</Link></li>
<l... | import React from 'react';
import { Link } from 'react-router';
export default class Navigation extends React.Component {
render() {
return (
<div>
<h1>{this.props.appName}</h1>
<ul>
<li><Link to="/">Home</Link></li>
<li><Link to="/page/0">Page 0</Link></li>
<l... | Fix Falcor cache article indexing bug | Fix Falcor cache article indexing bug
| JSX | mit | thegazelle-ad/gazelle-server,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 | ---
+++
@@ -11,7 +11,7 @@
<li><Link to="/page/0">Page 0</Link></li>
<li><Link to="/page/1">Page 1</Link></li>
<li><Link to="/page/2">Page 2</Link></li>
- <li><Link to="/article/1">Article 1</Link></li>
+ <li><Link to="/article/0">Article 1</Link></li>
</ul>
... |
599f5757bca438129f10c3ab9d8353ea48455ebe | src/components/query.jsx | src/components/query.jsx | import React, { Component, PropTypes } from 'react';
import hoistStatics from 'hoist-non-react-statics';
import { resolveComponentsQueries } from '../query';
function getDisplayName(WrappedComponent) {
return WrappedComponent.displayName || WrappedComponent.name || 'Component';
}
export default function query(queri... | import React, { Component, PropTypes } from 'react';
import hoistStatics from 'hoist-non-react-statics';
import { resolveComponentsQueries } from '../query';
function getDisplayName(WrappedComponent) {
return WrappedComponent.displayName || WrappedComponent.name || 'Component';
}
export default function query(queri... | Remove console.info when resolving queries | Remove console.info when resolving queries
| JSX | mit | nucleate/nucleate | ---
+++
@@ -16,7 +16,6 @@
routes[0],
routes.map(r => r.component)
).then((resolvedQueries) => {
- console.info('resolved queries', resolvedQueries);
mergeResolvedQueries(resolvedQueries);
});
} |
1517c44d9ee823cc16f5759a5073cdeb20dc25ae | src/components/group-settings.jsx | src/components/group-settings.jsx | import React from 'react'
import {connect} from 'react-redux'
import _ from 'lodash'
import {updateGroup} from '../redux/action-creators'
import GroupSettingsForm from './group-settings-form'
const GroupSettings = (props) => (
<div className="content">
<div className="box">
<div className="box-header-time... | import React from 'react'
import {Link} from 'react-router'
import {connect} from 'react-redux'
import _ from 'lodash'
import {updateGroup} from '../redux/action-creators'
import GroupSettingsForm from './group-settings-form'
const GroupSettings = (props) => (
<div className="content">
<div className="box">
... | Add a link back to the group page | [group-descriptions] Add a link back to the group page
| JSX | mit | kadmil/freefeed-react-client,davidmz/freefeed-react-client,FreeFeed/freefeed-html-react,ujenjt/freefeed-react-client,ujenjt/freefeed-react-client,clbn/freefeed-gamma,FreeFeed/freefeed-react-client,FreeFeed/freefeed-react-client,davidmz/freefeed-react-client,FreeFeed/freefeed-html-react,kadmil/freefeed-react-client,davi... | ---
+++
@@ -1,4 +1,5 @@
import React from 'react'
+import {Link} from 'react-router'
import {connect} from 'react-redux'
import _ from 'lodash'
@@ -9,7 +10,7 @@
<div className="content">
<div className="box">
<div className="box-header-timeline">
- Settings
+ <Link to={`/${props.grou... |
65248ef36bcff9b1e3a3f56eeaadcd148263a07f | client/js/app.jsx | client/js/app.jsx | "use strict";
import React from 'react';
import ReactDOM from 'react-dom';
import Router from 'react-router';
import Routes from './routes';
import SettingsAction from './actions/settings';
import history from './history';
//Needed for onTouchTap
//Can go away when react 1.0 rele... | "use strict";
import React from 'react';
import ReactDOM from 'react-dom';
import Router from 'react-router';
import Routes from './routes';
import SettingsAction from './actions/settings';
import history from './history';
// Initialize store singletons
SettingsAction.load(window... | Remove the rest of material ui | Remove the rest of material ui
| JSX | mit | atomicjolt/adhesion,atomicjolt/react_starter_app,atomicjolt/react_rails_starter_app,atomicjolt/react_rails_starter_app,atomicjolt/adhesion,atomicjolt/react_rails_starter_app,atomicjolt/adhesion,atomicjolt/lti_starter_app,atomicjolt/react_starter_app,atomicjolt/lti_starter_app,atomicjolt/lti_starter_app,atomicjolt/react... | ---
+++
@@ -7,26 +7,6 @@
import SettingsAction from './actions/settings';
import history from './history';
-//Needed for onTouchTap
-//Can go away when react 1.0 release
-//Check this repo:
-//https://github.com/zilverline/react-tap-event-plugin
-import injectTapEventPlugin from "react-tap-event-plugin";
-... |
ed624a1b5d594d58814159ec7bc84616308dff69 | ui/component/claimInsufficientCredits/view.jsx | ui/component/claimInsufficientCredits/view.jsx | // @flow
import * as React from 'react';
import Button from 'component/button';
import I18nMessage from 'component/i18nMessage';
type Props = {
uri: string,
fileInfo: FileListItem,
isInsufficientCredits: boolean,
claimWasPurchased: boolean,
};
function ClaimInsufficientCredits(props: Props) {
const { isInsu... | // @flow
import * as React from 'react';
import Button from 'component/button';
import I18nMessage from 'component/i18nMessage';
type Props = {
uri: string,
fileInfo: FileListItem,
isInsufficientCredits: boolean,
claimWasPurchased: boolean,
};
function ClaimInsufficientCredits(props: Props) {
const { isInsu... | Correct link to buy page | Correct link to buy page | JSX | mit | lbryio/lbry-app,lbryio/lbry-electron,lbryio/lbry-app,lbryio/lbry-electron,lbryio/lbry-electron | ---
+++
@@ -22,7 +22,7 @@
<I18nMessage
tokens={{
reward_link: <Button button="link" navigate="/$/rewards" label={__('Rewards')} />,
- buy_link: <Button button="link" navigate="/$/rewards" label={__('buy')} />,
+ buy_link: <Button button="link" navigate="/$/buy" label={__('... |
40706b1eaa409ba3d4945d71574d7e16929a9d98 | ui/src/components/DocumentScreen/viewers/PdfViewer.jsx | ui/src/components/DocumentScreen/viewers/PdfViewer.jsx | import React, { Component } from 'react';
import { Document, Page } from 'react-pdf/build/entry.webpack';
import { findLast } from 'lodash';
import { parse as parsePdfFragId } from 'src/util/pdfFragId';
import './PdfViewer.css';
class PdfViewer extends Component {
constructor(props) {
super(props);
this.st... | import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import { Document, Page } from 'react-pdf/build/entry.webpack';
import { findLast } from 'lodash';
import { parse as parsePdfFragId } from 'src/util/pdfFragId';
import './PdfViewer.css';
class PdfViewer extends Component {
construct... | Add links to prev/next page. | Add links to prev/next page.
| JSX | mit | alephdata/aleph,pudo/aleph,pudo/aleph,pudo/aleph,alephdata/aleph,alephdata/aleph,alephdata/aleph,alephdata/aleph | ---
+++
@@ -1,4 +1,5 @@
import React, { Component } from 'react';
+import { Link } from 'react-router-dom';
import { Document, Page } from 'react-pdf/build/entry.webpack';
import { findLast } from 'lodash';
@@ -27,6 +28,12 @@
return (
<div className="PdfViewer">
+ {(pageNumber > 1) &&
+ ... |
11d1ab3641a544a6df9be33c302db0f33bc2faab | src/containers/ComicListContainer.jsx | src/containers/ComicListContainer.jsx | import React, { PropTypes } from 'react'
import { connect } from 'react-redux'
import ComicList from '../components/ComicList'
import * as Actions from '../actions'
class ComicListContainer extends React.Component {
static propTypes = {
filter: PropTypes.object.isRequired,
comics: PropTypes.array.isRequir... | import React, { PropTypes } from 'react'
import { connect } from 'react-redux'
import ComicList from '../components/ComicList'
import * as Actions from '../actions'
class ComicListContainer extends React.Component {
static propTypes = {
filter: PropTypes.object.isRequired,
comics: PropTypes.array.isRequir... | Fix unexpected comics state reset after navigating from ComicViewer to ComicList | Fix unexpected comics state reset after navigating from ComicViewer to ComicList
| JSX | mit | rickychien/comiz,rickychien/comiz | ---
+++
@@ -14,7 +14,9 @@
}
componentDidMount() {
- this.props.dispatch(Actions.fetchComicsIfNeeded())
+ if (!this.props.comics || this.props.comics.length === 0) {
+ this.props.dispatch(Actions.fetchComicsIfNeeded())
+ }
}
filterComics = () => { |
909f00d4cbe2890ad201a32083a42baa946881fc | imports/ui/Location.jsx | imports/ui/Location.jsx | import React, { Component, PropTypes } from 'react';
import { Locations } from '../api/locations.js';
// Location component - represents a single location item
export default class Location extends Component {
toggleChecked() {
Locations.update(this.props.location._id, {
$set: { checked: !this.props.locat... | import React, { Component, PropTypes } from 'react';
import { Locations } from '../api/locations.js';
// Location component - represents a single location item
export default class Location extends Component {
toggleChecked() {
Locations.update(this.props.location._id, {
$set: { checked: !this.props.locat... | Make UI match the data structure | Make UI match the data structure
| JSX | mit | scimusmn/map-stories,scimusmn/map-stories | ---
+++
@@ -33,7 +33,7 @@
/>
<span className="text">
- <strong>{this.props.location.username}</strong>: {this.props.location.text}
+ <strong>{this.props.location.username}</strong>: {this.props.location.name}
</span>
</li>
); |
2fab42c47102ddea8c35702279a627f5f6a02aa7 | imports/startup/client/routes.jsx | imports/startup/client/routes.jsx | import React from 'react';
import { Router, Route, browserHistory, Redirect } from 'react-router';
import StructureView from '../../ui/structure-view/structure-view.jsx';
import MeasureView from '../../ui/measure-view/measure-view.jsx';
import ReportView from '../../ui/report-view/report-view.jsx';
// route component... | import React from 'react';
import { Router, Route, browserHistory, Redirect } from 'react-router';
import StructureView from '../../ui/structure-view/structure-view.jsx';
import MeasureView from '../../ui/measure-view/measure-view.jsx';
import ReportView from '../../ui/report-view/report-view.jsx';
// route component... | Make structure view the landing page | Make structure view the landing page
| JSX | mit | minden/data-furnace,minden/data-furnace | ---
+++
@@ -10,7 +10,7 @@
export const getRoutes = () => (
<Router history={browserHistory}>
- <Redirect from="/" to="/measure-view" />
+ <Redirect from="/" to="/structure-view" />
<Route path="/" component={App}>
<Route path="/structure-view" component={StructureView} />
<Route path="/... |
89113c8f52f83d9f8b57352e8a2be81577102fa8 | app/assets/javascripts/components/AboutTeamComponents/AboutTeamShow.js.jsx | app/assets/javascripts/components/AboutTeamComponents/AboutTeamShow.js.jsx | var AboutTeamShow = React.createClass({
render: function(){
return (
<div className="about_team_show_page">
< CommunityStandards />
< TeamMediaCards />
</div>
)
}
})
| var AboutTeamShow = React.createClass({
render: function(){
return (
<div className="about_team_show_page">
< CommunityStandards />
< CategoryDescriptions />
< TeamMediaCards />
</div>
)
}
})
| Add community standards to the about team page | Add community standards to the about team page
| JSX | mit | ShadyLogic/fixstarter,TimCannady/fixstarter,TimCannady/fixstarter,ShadyLogic/fixstarter,ShadyLogic/fixstarter,TimCannady/fixstarter | ---
+++
@@ -3,6 +3,7 @@
return (
<div className="about_team_show_page">
< CommunityStandards />
+ < CategoryDescriptions />
< TeamMediaCards />
</div>
) |
79bc95a4c6042451eba613862c09b30307d8c05b | src/components/video/video.jsx | src/components/video/video.jsx | const PropTypes = require('prop-types');
const React = require('react');
const classNames = require('classnames');
require('./video.scss');
const Video = props => (
<div className={classNames('video-player', props.className)}>
<iframe
allowFullScreen
// allowFullScreen is legacy, c... | const PropTypes = require('prop-types');
const React = require('react');
const classNames = require('classnames');
require('./video.scss');
const Video = props => (
<div className={classNames('video-player', props.className)}>
<iframe
allowFullScreen
// allowFullScreen is legacy, c... | Add ability to display YouTube in addition to Wistia | Add ability to display YouTube in addition to Wistia
| JSX | bsd-3-clause | LLK/scratch-www,LLK/scratch-www | ---
+++
@@ -13,7 +13,10 @@
frameBorder="0" // deprecated attribute
height={props.height}
scrolling="no" // deprecated attribute
- src={`https://fast.wistia.net/embed/iframe/${props.videoId}?seo=false&videoFoam=true`}
+ src={props.isYouTube ?
+ ... |
e2ae93c7aab392c979a4d83c3e50c7c1de7557c8 | src/controls/StyleButton.jsx | src/controls/StyleButton.jsx | import React, { Component, PropTypes } from 'react';
class StyleButton extends Component {
constructor() {
super();
this.onToggle = (e) => {
e.preventDefault();
this.props.onToggle(this.props.style);
};
}
render() {
let className = 'DraftJSEditor-styleButton';
if (this.props.act... | import React, { Component, PropTypes } from 'react';
class StyleButton extends Component {
constructor() {
super();
this.onToggle = (e) => {
e.preventDefault();
this.props.onToggle(this.props.style);
};
}
render() {
let className = 'DraftJSEditor-styleButton';
if (this.props.act... | Add title attribute with label to control buttons | Add title attribute with label to control buttons
| JSX | mit | synapsestudios/draftjs-editor | ---
+++
@@ -17,7 +17,11 @@
}
return (
- <span className={className} onMouseDown={this.onToggle}>
+ <span
+ className={className}
+ title={this.props.label}
+ onMouseDown={this.onToggle}
+ >
{this.props.icon ? this.props.icon : this.props.label}
</span>
... |
a7db45324067a9f239e68599005fb5bd3dee60bb | src/pages/index.jsx | src/pages/index.jsx | import React from 'react'
import Helmet from 'react-helmet'
import HeroBlock from './HeroBlock'
import HeroImage from './HeroImage'
import About from './About'
import Career from './Career'
import '../lib/font-awesome/css/font-awesome.min.css'
import './index.scss'
const Footer = () => (
<div className="Footer">
... | import React from 'react'
import Helmet from 'react-helmet'
import HeroBlock from './HeroBlock'
import HeroImage from './HeroImage'
import About from './About'
import Career from './Career'
import '../lib/font-awesome/css/font-awesome.min.css'
import './index.scss'
const getYear = () => new Date().getFullYear()
cons... | Add automatic copyright year updating | Add automatic copyright year updating
| JSX | mit | Echie/echie-net | ---
+++
@@ -8,10 +8,12 @@
import '../lib/font-awesome/css/font-awesome.min.css'
import './index.scss'
+const getYear = () => new Date().getFullYear()
+
const Footer = () => (
<div className="Footer">
<div className="Footer-Text">
- <p className="small">© Teemu Huovinen 2018</p>
+ ... |
07e697ef752b25da0979502ffb478d0bd2255be5 | src/js/components/login/Password.jsx | src/js/components/login/Password.jsx | /**
* Password.jsx
* Created by Kyle Fox 12/4/15
**/
import React, { PropTypes } from 'react';
const propTypes = {
handleChange: PropTypes.func.isRequired
};
export default class Password extends React.Component {
render() {
return (
<div className="usa-da-input-container usa-da-input-pas... | /**
* Password.jsx
* Created by Kyle Fox 12/4/15
**/
import React, { PropTypes } from 'react';
const propTypes = {
handleChange: PropTypes.func.isRequired,
fieldID: PropTypes.string
};
const defaultProps = {
fieldID: "password"
};
export default class Password extends React.Component {
render() {
... | Add fieldID prop to password component | Add fieldID prop to password component
| JSX | cc0-1.0 | fedspendingtransparency/data-act-broker-web-app,fedspendingtransparency/data-act-broker-web-app | ---
+++
@@ -6,9 +6,12 @@
import React, { PropTypes } from 'react';
const propTypes = {
- handleChange: PropTypes.func.isRequired
+ handleChange: PropTypes.func.isRequired,
+ fieldID: PropTypes.string
};
-
+const defaultProps = {
+ fieldID: "password"
+};
export default class Password extends React.C... |
929d56be160ccf0ab3a986e192331f1023833877 | livedoc-ui/src/components/doc/DocPresenter.jsx | livedoc-ui/src/components/doc/DocPresenter.jsx | // @flow
import * as React from 'react';
import { connect } from 'react-redux';
import type { Livedoc } from '../../model/livedoc';
import type { State } from '../../model/state';
import DocContent from './content/DocContent';
import { GlobalInfo } from './GlobalInfo';
import { LoadingInfo } from './LoadingInfo';
impor... | // @flow
import * as React from 'react';
import {Col, Grid, Row} from 'react-bootstrap';
import {connect} from 'react-redux';
import {Livedoc} from '../../model/livedoc';
import type {State} from '../../model/state';
import DocContent from './content/DocContent';
import {GlobalInfo} from './GlobalInfo';
import {Loading... | Improve layout using bootstrap's grid | Improve layout using bootstrap's grid
| JSX | mit | joffrey-bion/livedoc,joffrey-bion/livedoc,joffrey-bion/livedoc,joffrey-bion/livedoc,joffrey-bion/livedoc | ---
+++
@@ -1,11 +1,12 @@
// @flow
import * as React from 'react';
-import { connect } from 'react-redux';
-import type { Livedoc } from '../../model/livedoc';
-import type { State } from '../../model/state';
+import {Col, Grid, Row} from 'react-bootstrap';
+import {connect} from 'react-redux';
+import {Livedoc} fr... |
445116a9b2fd08ed96ce81ecf8f8157ac9ae8987 | src/components/ResultStatsRow.jsx | src/components/ResultStatsRow.jsx | import React, { PropTypes } from 'react';
import { Row, Col } from 'react-bootstrap';
import InformationLabel from './InformationLabel';
import languageColors from '../utils/languageColors';
import '../styles/result-stats-row.css';
const ResultStatsRow = (props) => {
const data = props.data;
return (
<Row cla... | import React, { PropTypes } from 'react';
import { Row, Col } from 'react-bootstrap';
import InformationLabel from './InformationLabel';
import languageColors from '../utils/languageColors';
import '../styles/result-stats-row.css';
const ResultStatsRow = (props) => {
const data = props.data;
return (
<Row cla... | Update issue badge text to indicate the count also includes PRs | Update issue badge text to indicate the count also includes PRs
| JSX | mit | tmobaird/i-want-to-contribute,tmobaird/i-want-to-contribute | ---
+++
@@ -13,7 +13,7 @@
<InformationLabel data={data.forks_count} level="success">{ "Forks: " }</InformationLabel>
<InformationLabel data={data.stargazers_count} level="warning">{ "Stars: " }</InformationLabel>
<InformationLabel data={data.watchers_count} level="info">{ "Watchers: " }</In... |
8202ce6170e52947beb05e7609561db95bf72564 | web-server/app/assets/javascripts/components/packages/list-of-packages-for-vin.jsx | web-server/app/assets/javascripts/components/packages/list-of-packages-for-vin.jsx | define(function(require) {
var React = require('react'),
Router = require('react-router'),
_ = require('underscore'),
SotaDispatcher = require('sota-dispatcher');
var Packages = React.createClass({
contextTypes: {
router: React.PropTypes.func
},
componentWillUnmount: function()... | define(function(require) {
var React = require('react'),
Router = require('react-router'),
_ = require('underscore'),
SotaDispatcher = require('sota-dispatcher');
var Packages = React.createClass({
contextTypes: {
router: React.PropTypes.func
},
componentWillUnmount: function()... | Remove meaningless 'create campaign' link | Remove meaningless 'create campaign' link
| JSX | mpl-2.0 | PDXostc/rvi_sota_server,PDXostc/rvi_sota_server,PDXostc/rvi_sota_server | ---
+++
@@ -28,11 +28,6 @@
<td>
{ package.version }
</td>
- <td>
- <Router.Link to='new-campaign' params={{name: package.name, version: package.version}}>
- Create Campaign
- </Router.Link>
- </td>
</tr>... |
90b670ddc46749735f3c83f3298a82079e0935fb | app/components/pages/_Page.jsx | app/components/pages/_Page.jsx | import PropTypes from 'prop-types';
import React from 'react';
import Header from '../organisms/Header';
import Footer from '../organisms/Footer';
class Page extends React.Component {
render() {
return (
<div>
<Header />
{ this.props.children }
<Footer />
</div>
);
}
}... | import PropTypes from 'prop-types';
import React from 'react';
import Header from '../organisms/Header';
import Footer from '../organisms/Footer';
import { hot } from 'react-hot-loader';
class Page extends React.Component {
render() {
return (
<div>
<Header />
{ this.props.children }
... | Allow hot reloading outside of page content... | Allow hot reloading outside of page content...
https://github.com/gatsbyjs/gatsby/issues/8237#issuecomment-422213443
Though according to someone on discord, hot reloading should have been
working out of the box.
Also, not sure if this change has any consequences.
| JSX | mit | amcsi/szeremi,amcsi/szeremi | ---
+++
@@ -2,6 +2,7 @@
import React from 'react';
import Header from '../organisms/Header';
import Footer from '../organisms/Footer';
+import { hot } from 'react-hot-loader';
class Page extends React.Component {
render() {
@@ -21,4 +22,4 @@
children: PropTypes.node,
};
-export default (Page);
+export ... |
d8f44307cf5d1fff2fcdb3762573b9a6f42d7561 | client/source/components/SearchExplore/searchResultsList.jsx | client/source/components/SearchExplore/searchResultsList.jsx | import React, {Component} from 'react';
//Bootstrap
import { Grid, Row, Col, Table, Button, Thumbnail } from 'react-bootstrap';
export default ({recipeList, name, handleRecipeForkClick, handleRecipeCookClick}) => {
return (
<div>
{recipeList.map((recipe, i) => {
return (
<Col xs={3} md={3} ke... | import React, {Component} from 'react';
//Bootstrap
import { Grid, Row, Col, Table, Button, Thumbnail } from 'react-bootstrap';
export default ({recipeList, name, handleRecipeForkClick, handleRecipeCookClick}) => {
return (
<div>
{recipeList.map((recipe, i) => {
return (
<Col xs={3} md={3} ke... | Fix bug preventing users from accessing root recipes shown in the Explore component Fixed bug involving the cook button | Fix bug preventing users from accessing root recipes shown in the Explore component
Fixed bug involving the cook button
| JSX | mit | JAC-Labs/SkilletHub,JAC-Labs/SkilletHub | ---
+++
@@ -13,8 +13,8 @@
<h4>cooked by // {recipe.username}</h4>
<p>{recipe.description.value.split('.').slice(0,2).join('.')}...Click to read more</p>
<p>
- <Button bsStyle="success" onClick={handleRecipeCookClick.bind(this)} data-username={recipe.username} data-r... |
95e0fc31e41b0cd773e451cf40e57bf444204bb8 | src/OverflowDetector.jsx | src/OverflowDetector.jsx | import React, { Component, PropTypes } from 'react';
import ResizeDetector from './ResizeDetector';
export default class OverflowDetector extends Component {
static propTypes = {
onOverflowChange: PropTypes.func,
children: PropTypes.node,
style: PropTypes.object,
className: PropTypes.string,
};
... | import React, { Component, PropTypes } from 'react';
import ResizeDetector from './ResizeDetector';
export default class OverflowDetector extends Component {
static propTypes = {
onOverflowChange: PropTypes.func,
children: PropTypes.node,
style: PropTypes.object,
className: PropTypes.string,
};
... | Fix issue with vertical overflow detection | Fix issue with vertical overflow detection
| JSX | mit | nickuraltsev/react-overflow | ---
+++
@@ -36,7 +36,7 @@
checkOverflow() {
const isOverflowed =
this.domElement.scrollWidth > this.domElement.clientWidth ||
- this.domElement.scrollHeight > this.domElement.scrollHeight;
+ this.domElement.scrollHeight > this.domElement.clientHeight;
if (isOverflowed !== this.isOverfl... |
32d30a65d9862aadcec3728ba74ec95c761cd9cf | lib/src/_shared/MaskedInput.jsx | lib/src/_shared/MaskedInput.jsx | import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import MaskedInput from 'react-text-mask';
export default class Input extends PureComponent {
static propTypes = {
mask: PropTypes.any,
inputRef: PropTypes.func.isRequired,
}
static defaultProps = {
mask: undefined,
... | import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import MaskedInput from 'react-text-mask';
export default class Input extends PureComponent {
static propTypes = {
mask: PropTypes.any,
value: PropTypes.string,
inputRef: PropTypes.func.isRequired,
}
static defaultProp... | Fix showing mask on clearing timepicker | Fix showing mask on clearing timepicker
| JSX | mit | callemall/material-ui,callemall/material-ui,mui-org/material-ui,mbrookes/material-ui,callemall/material-ui,mbrookes/material-ui,dmtrKovalenko/material-ui-pickers,rscnt/material-ui,oliviertassinari/material-ui,callemall/material-ui,mui-org/material-ui,oliviertassinari/material-ui,dmtrKovalenko/material-ui-pickers,rscnt/... | ---
+++
@@ -5,18 +5,28 @@
export default class Input extends PureComponent {
static propTypes = {
mask: PropTypes.any,
+ value: PropTypes.string,
inputRef: PropTypes.func.isRequired,
}
static defaultProps = {
+ value: undefined,
mask: undefined,
}
+ getMask = () => {
+ if (th... |
9a7a8e98d87ca3ff333a797c66ba6b5391f1a37c | src/components/settings/sign-in.jsx | src/components/settings/sign-in.jsx | import { Link } from 'react-router';
import ExtAuthForm from './forms/ext-auth-accounts';
import ChangePasswordForm from './forms/change-password';
import styles from './settings.module.scss';
import { SettingsPage } from './layout';
export default function SignInPage() {
return (
<SettingsPage title="Password ... | import { Link } from 'react-router';
import ExtAuthForm from './forms/ext-auth-accounts';
import ChangePasswordForm from './forms/change-password';
import styles from './settings.module.scss';
import { SettingsPage } from './layout';
export default function SignInPage() {
return (
<SettingsPage title="Password ... | Rename 'authorization sessions' to 'login sessions' | Rename 'authorization sessions' to 'login sessions' | JSX | mit | FreeFeed/freefeed-react-client,FreeFeed/freefeed-react-client,FreeFeed/freefeed-react-client | ---
+++
@@ -19,9 +19,9 @@
</section>
<section className={styles.formSection}>
- <h4>Authorization sessions</h4>
+ <h4>Login sessions</h4>
<p>
- <Link to="/settings/sign-in/sessions">View your authorization sessions</Link>
+ <Link to="/settings/sign-in/sessions"... |
36b4f4cf42cd5cc691b4b28ae04ff677e8321ec4 | src/components/status.jsx | src/components/status.jsx | /*eslint no-extra-parens:0*/
import React from 'react';
/**
* @class Status
* @extends React.Component
* @public
*
* Displays information about the current sculpture data,
* recent state udpates, and actions.
*/
export default class Status extends React.Component {
static propTypes = {
commandLog: React.... | /*eslint no-extra-parens:0*/
import React from 'react';
/**
* @class Status
* @extends React.Component
* @public
*
* Displays information about the current sculpture data,
* recent state udpates, and actions.
*/
export default class Status extends React.Component {
static propTypes = {
commandLog: React.... | Use ES6 instead of lodash | Use ES6 instead of lodash
| JSX | mit | anyWareSculpture/sculpture-emulator-client,anyWareSculpture/sculpture-emulator-client | ---
+++
@@ -16,7 +16,7 @@
sculpture: React.PropTypes.object.isRequired
};
render() {
- const msgs = _(this.props.commandLog).map((msg, idx) => <p key={idx}>{msg}</p>).reverse().value();
+ const msgs = this.props.commandLog.map((msg, idx) => <p key={idx}>{msg}</p>).reverse();
const currentGame = ... |
75012735ebea80d5850aaca0ca4001f934a8b6d3 | client/app/bundles/course/survey/containers/UnsubmitButton.jsx | client/app/bundles/course/survey/containers/UnsubmitButton.jsx | import PropTypes from 'prop-types';
import { useSelector } from 'react-redux';
import { IconButton } from '@mui/material';
import RemoveCircle from '@mui/icons-material/RemoveCircle';
const styles = {
formButton: {
padding: '0.25em 0.4em',
},
};
const UnsubmitButton = (props) => {
const isUnsubmitting =
... | import { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { IconButton } from '@mui/material';
import RemoveCircle from '@mui/icons-material/RemoveCircle';
const styles = {
formButton: {
padding: '0.25em 0.4em',
},
};
class UnsubmitButton extends Comp... | Fix test by adding dummy store, fix linting | refactor(surveysChipIcons): Fix test by adding dummy store, fix linting
| JSX | mit | Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2 | ---
+++
@@ -1,5 +1,6 @@
+import { Component } from 'react';
import PropTypes from 'prop-types';
-import { useSelector } from 'react-redux';
+import { connect } from 'react-redux';
import { IconButton } from '@mui/material';
import RemoveCircle from '@mui/icons-material/RemoveCircle';
@@ -9,37 +10,33 @@
},
};... |
31db199818339a90756a31972276f9d86e642ee9 | components/slices/experience/content.jsx | components/slices/experience/content.jsx | import React, { PureComponent } from 'react'
import { uniqBy } from 'lodash'
import Entry from './entry'
class Content extends PureComponent {
displayName = 'SliceContent'
constructor (props) {
super(props)
const { tasks, techStack } = this.getTasksAndStack({
tasks: props.tasks
})
this.sta... | import React, { PureComponent } from 'react'
import uniqBy from 'lodash.uniqby'
import Entry from './entry'
class Content extends PureComponent {
displayName = 'SliceContent'
constructor (props) {
super(props)
const { tasks, techStack } = this.getTasksAndStack({
tasks: props.tasks
})
this.... | Use lodash module, not the whole lib. | Use lodash module, not the whole lib.
| JSX | mit | andreiconstantinescu/constantinescu.io | ---
+++
@@ -1,5 +1,5 @@
import React, { PureComponent } from 'react'
-import { uniqBy } from 'lodash'
+import uniqBy from 'lodash.uniqby'
import Entry from './entry'
class Content extends PureComponent { |
01939bee685831667426a30fb63a001174689fdd | src/components/about/about-body.jsx | src/components/about/about-body.jsx | import React from 'react';
import Icon from '../partials/icon.jsx';
import linebreakToBr from "../../helpers/linebreak-to-br";
export default class AboutBody extends React.PureComponent {
render() {
const {about} = this.props.profile;
const findMeOnElements = about.findMeOn.map(
(element, i) => <a cl... | import React from 'react';
import Icon from '../partials/icon.jsx';
import linebreakToBr from "../../helpers/linebreak-to-br";
export default class AboutBody extends React.PureComponent {
render() {
const {about} = this.props.profile;
const findMeOnElements = about.findMeOn.map(
(element, i) => (elem... | Replace a for span in findMeOnElements which hasn't any link | Replace a for span in findMeOnElements which hasn't any link
| JSX | mit | nethruster/ptemplate,nethruster/ptemplate | ---
+++
@@ -8,7 +8,11 @@
render() {
const {about} = this.props.profile;
const findMeOnElements = about.findMeOn.map(
- (element, i) => <a className="flex flex-cross-center" key={i} href={element.url} target="_blank"><Icon iconName={element.iconName} iconColor={element.hoverColor} /> {element.te... |
7eb875697b062cb01c003fcc0bdeaa9dab76fac6 | src/mb/containers/HomePage.jsx | src/mb/containers/HomePage.jsx | import React from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import modelActionCreators from '../actions/model-action-creators';
import LoLoMo from './LoLoMo';
@connect(
state => ({ models: state.models }),
dispatch => bindActionCreators(modelActionCreators, dispa... | import React from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import modelActionCreators from '../actions/model-action-creators';
import LoLoMo from './LoLoMo';
@connect(
state => ({ models: state.models }),
dispatch => ({
actions: bindActionCreators(modelActio... | Put all loading actions to the 'actions' property | Put all loading actions to the 'actions' property
| JSX | mit | MagicCube/movie-board,MagicCube/movie-board,MagicCube/movie-board | ---
+++
@@ -8,7 +8,9 @@
@connect(
state => ({ models: state.models }),
- dispatch => bindActionCreators(modelActionCreators, dispatch)
+ dispatch => ({
+ actions: bindActionCreators(modelActionCreators, dispatch)
+ })
)
/**
* Home page container.
@@ -19,8 +21,10 @@
inTheaters: React.PropTypes.o... |
cac92bef308f21d9fbd05546361f73139cfa56fd | app/index.jsx | app/index.jsx | import React from 'react';
import dataStore from './stores/dataStore';
import JscsModel from './models/JscsModel';
if (typeof window.__jscsData !== 'undefined') {
dataStore.setData(JscsModel.fromJSON(window.__jscsData));
}
import AppView from './views/AppView';
React.render(<AppView />, document.getElementById('... | import React from 'react';
import dataStore from './stores/dataStore';
import JscsModel from './models/JscsModel';
if (typeof window.__jscsData !== 'undefined') {
dataStore.setData(JscsModel.fromJSON(window.__jscsData));
}
var AppView = require('./views/AppView');
React.render(<AppView />, document.getElementByI... | Fix loading hash legacy links | Fix loading hash legacy links
| JSX | mit | dutzi/jscs-dev.github.io,indexzero/jscs-dev.github.io,jscs-dev/jscs-dev.github.io,escaton/jscs-dev.github.io,indexzero/jscs-dev.github.io,dutzi/jscs-dev.github.io,escaton/jscs-dev.github.io,jscs-dev/jscs-dev.github.io | ---
+++
@@ -6,6 +6,6 @@
dataStore.setData(JscsModel.fromJSON(window.__jscsData));
}
-import AppView from './views/AppView';
+var AppView = require('./views/AppView');
React.render(<AppView />, document.getElementById('root')); |
52f1f2661edc103d5db6306dfe676916dd4709d0 | WebClient/app/scene/Board/components/SideBarOverlay/components/Tools/components/GenericTool/index.jsx | WebClient/app/scene/Board/components/SideBarOverlay/components/Tools/components/GenericTool/index.jsx | import React from 'react'
import {
Icon
} from 'semantic-ui-react'
export default class GenericTool extends React.Component {
render () {
return (
<div onClick={this.props.onClickTool} style={{width: '38px', height: '38px'}}>
<Icon name={this.props.content} size='large' style={{paddingTop: '5px'... | import React from 'react'
import { Icon } from 'semantic-ui-react'
export default function GenericTool (props) {
const style = {paddingTop: '5px', width: '38px', height: '38px'}
return <Icon onClick={props.onClickTool} name={props.content} size='large' style={style} />
}
| Change GenericTool to functional Component | Change GenericTool to functional Component
| JSX | mit | PedDavid/qip,PedDavid/qip,PedDavid/qip | ---
+++
@@ -1,15 +1,8 @@
import React from 'react'
-import {
- Icon
-} from 'semantic-ui-react'
+import { Icon } from 'semantic-ui-react'
-export default class GenericTool extends React.Component {
- render () {
- return (
- <div onClick={this.props.onClickTool} style={{width: '38px', height: '38px'}}>... |
56f27b6fa63c5ef23e960eaef6fa07a4c2f463c5 | client/src/components/Header.jsx | client/src/components/Header.jsx | import React from 'react';
class Header extends React.Component {
constructor (props) {
super(props);
}
render() {
return (
<div>
<div className="page-header text-center">
<h1>FoodQuest</h1>
<small>the go-to app for Adventurous Eaters</small>
</div>
</div>... | import React from 'react';
class Header extends React.Component {
constructor (props) {
super(props);
}
render() {
return (
<div>
<div className="page-header text-center">
<h1>Food Quest</h1>
<small>the go-to app for Adventurous Eaters</small>
</div>
</div... | Add a space in the name of the app. | Add a space in the name of the app.
| JSX | mit | Sibilant-Siblings/sibilant-siblings,Sibilant-Siblings/sibilant-siblings | ---
+++
@@ -9,7 +9,7 @@
return (
<div>
<div className="page-header text-center">
- <h1>FoodQuest</h1>
+ <h1>Food Quest</h1>
<small>the go-to app for Adventurous Eaters</small>
</div>
</div> |
dda5db611d2b529cc17c3a1ad913f2d3345ef07a | src/pages/_document.jsx | src/pages/_document.jsx | import React from 'react';
import Document, { Head, Main, NextScript } from 'next/document';
export default class BaseDocument extends Document {
static async getInitialProps(ctx) {
const initialProps = await Document.getInitialProps(ctx);
return initialProps;
}
render() {
// cons... | import React from 'react';
import Document, { Head, Main, NextScript } from 'next/document';
export default class BaseDocument extends Document {
static async getInitialProps(ctx) {
const initialProps = await Document.getInitialProps(ctx);
return initialProps;
}
render() {
const i... | Disable root style.css in non production environment | Disable root style.css in non production environment
| JSX | mit | ArturJS/ArturJS.github.io,ArturJS/ArturJS.github.io | ---
+++
@@ -9,18 +9,18 @@
}
render() {
- // const { dir } = this.props;
-
- // console.log(this.props);
+ const isProduction = process.env.NODE_ENV === 'production';
return (
<html lang="en">
<Head>
- <link
- ... |
7b99d781034ebaf9c764bd3a7ba62041e217d339 | sample/parcel/Sample.jsx | sample/parcel/Sample.jsx | import React, { Component } from 'react';
import { Document, Page, setOptions } from 'react-pdf/src/entry.parcel';
import './Sample.less';
import pdfFile from './sample.pdf';
setOptions({
cMapUrl: 'cmaps/',
cMapPacked: true,
});
export default class Sample extends Component {
state = {
file: pdfFile,
... | import React, { Component } from 'react';
import { Document, Page, setOptions } from 'react-pdf/dist/entry.parcel';
import './Sample.less';
import pdfFile from './sample.pdf';
setOptions({
cMapUrl: 'cmaps/',
cMapPacked: true,
});
export default class Sample extends Component {
state = {
file: pdfFile,
... | Use compiled entry file for Parcel sample | Use compiled entry file for Parcel sample
| JSX | mit | wojtekmaj/react-pdf,wojtekmaj/react-pdf,wojtekmaj/react-pdf | ---
+++
@@ -1,5 +1,5 @@
import React, { Component } from 'react';
-import { Document, Page, setOptions } from 'react-pdf/src/entry.parcel';
+import { Document, Page, setOptions } from 'react-pdf/dist/entry.parcel';
import './Sample.less';
|
0f45dd33e0d5f988198f92e1840b89e5adce1d02 | test/components/overview/course_cloned_modal.spec.jsx | test/components/overview/course_cloned_modal.spec.jsx | import React from 'react';
import { mount } from 'enzyme';
import '../../testHelper';
import CourseClonedModal from '../../../app/assets/javascripts/components/overview/course_cloned_modal.jsx';
describe('CourseClonedModal', () => {
const course = {
slug: 'foo/bar_(baz)',
school: 'foo',
term: 'baz',
... | import React from 'react';
import { mount } from 'enzyme';
import '../../testHelper';
import CourseClonedModal from '../../../app/assets/javascripts/components/overview/course_cloned_modal.jsx';
describe('CourseClonedModal', () => {
const course = {
slug: 'foo/bar_(baz)',
school: 'foo',
term: 'baz',
... | Fix prop warnings in CourseClonedModal test | Fix prop warnings in CourseClonedModal test
| JSX | mit | sejalkhatri/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,sejalkhatri/WikiEduDashboard,sejalkhatri/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,sejalkhatri/WikiEduDashboard,sejalkhatri/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,WikiEducati... | ---
+++
@@ -15,6 +15,8 @@
const TestModal = mount(
<CourseClonedModal
course={course}
+ updateCourse={jest.fn()}
+ updateClonedCourse={jest.fn()}
/>
);
|
d4ac1cdd087b03419327e4647cd6451459c3c93a | webapp/components/Login.jsx | webapp/components/Login.jsx | import React, {Component} from 'react';
import PropTypes from 'prop-types';
import idx from 'idx';
import {connect} from 'react-redux';
import GitHubLoginButton from './GitHubLoginButton';
import Modal from './Modal';
class Login extends Component {
static propTypes = {
isAuthenticated: PropTypes.bool
};
s... | import React, {Component} from 'react';
import PropTypes from 'prop-types';
import idx from 'idx';
import {connect} from 'react-redux';
import GitHubLoginButton from './GitHubLoginButton';
import Modal from './Modal';
class Login extends Component {
static propTypes = {
isAuthenticated: PropTypes.bool
};
s... | Correct next redirect propagation in login component | fix: Correct next redirect propagation in login component
| JSX | apache-2.0 | getsentry/zeus,getsentry/zeus,getsentry/zeus,getsentry/zeus | ---
+++
@@ -36,7 +36,9 @@
<Modal title="Login">
<p>To continue you will need to first authenticate using your GitHub account.</p>
<p style={{textAlign: 'center'}}>
- <GitHubLoginButton next={idx(this.context.router, _ => _.query.next)} />
+ <GitHubLoginButton
+ ne... |
8b998de54f6a18116ff6576e755f1de4210cf881 | zucchini-ui-frontend/src/ui/components/RootPage.jsx | zucchini-ui-frontend/src/ui/components/RootPage.jsx | import PropTypes from "prop-types";
import React from "react";
import Navbar from "react-bootstrap/Navbar";
import Nav from "react-bootstrap/Nav";
import Container from "react-bootstrap/Container";
import { Link } from "react-router-dom";
import LoadingIndicator from "../../loadingIndicator/components/LoadingIndicator... | import PropTypes from "prop-types";
import React from "react";
import Navbar from "react-bootstrap/Navbar";
import Nav from "react-bootstrap/Nav";
import Container from "react-bootstrap/Container";
import { Link, NavLink } from "react-router-dom";
import LoadingIndicator from "../../loadingIndicator/components/Loading... | Use NavLink for current page | Use NavLink for current page
| JSX | mit | pgentile/tests-cucumber,pgentile/zucchini-ui,pgentile/tests-cucumber,pgentile/zucchini-ui,pgentile/zucchini-ui,pgentile/zucchini-ui,pgentile/zucchini-ui,pgentile/tests-cucumber,pgentile/tests-cucumber | ---
+++
@@ -3,7 +3,7 @@
import Navbar from "react-bootstrap/Navbar";
import Nav from "react-bootstrap/Nav";
import Container from "react-bootstrap/Container";
-import { Link } from "react-router-dom";
+import { Link, NavLink } from "react-router-dom";
import LoadingIndicator from "../../loadingIndicator/compone... |
1df5380c87b0cbcd9b7ba5e0c2f994b835dce661 | client/userlist.jsx | client/userlist.jsx | var React = require('react');
var Avatar = require('./avatar.jsx');
var UserList = React.createClass({
getInitialState() {
return {
users: [],
myUsername: null
};
},
onLogin(myUsername, users) {
this.setState({myUsername, users});
},
onJoin(username) ... | var React = require('react');
var Avatar = require('./avatar.jsx');
var UserList = React.createClass({
getInitialState() {
return {
users: [],
myUsername: null
};
},
onLogin(myUsername, users) {
this.setState({myUsername, users});
},
onJoin(username) ... | Use keys in user list | Use keys in user list
| JSX | mit | VitSalis/ting,mbalamat/ting,mbalamat/ting,VitSalis/ting,odyvarv/ting-1,dionyziz/ting,VitSalis/ting,dionyziz/ting,dionyziz/ting,odyvarv/ting-1,mbalamat/ting,sirodoht/ting,sirodoht/ting,VitSalis/ting,odyvarv/ting-1,sirodoht/ting,gtklocker/ting,dionyziz/ting,mbalamat/ting,sirodoht/ting,odyvarv/ting-1,gtklocker/ting,gtkloc... | ---
+++
@@ -34,7 +34,7 @@
render() {
var userNodes = this.state.users.map((user) => {
return (
- <User username={user} />
+ <User key={user} username={user} />
);
});
|
f350ec07a9c47035dfbc542f3a9f7991cf41e2e7 | src/containers/Root/Routes.jsx | src/containers/Root/Routes.jsx | import React from 'react'
import { Router, Route, Redirect, IndexRoute } from 'react-router'
/* Pages */
import Home from 'pages/Home'
import NotFound from 'pages/NotFound'
export default function Routes({ history }) {
const App = ({ children }) => children
return (
<Router history={ history }>
<Route p... | import React from 'react'
import { Router, Route, Redirect, IndexRoute } from 'react-router'
/* Pages */
import Home from 'pages/Home'
import NotFound from 'pages/NotFound'
export default function Routes({ history }) {
return (
<Router history={ history }>
<Route path="/">
<IndexRoute component={ ... | Remove trivial 'App => children' component; Router does this for you. | Remove trivial 'App => children' component; Router does this for you.
| JSX | mit | ADI-Labs/calendar-web,ADI-Labs/calendar-web | ---
+++
@@ -6,10 +6,9 @@
import NotFound from 'pages/NotFound'
export default function Routes({ history }) {
- const App = ({ children }) => children
return (
<Router history={ history }>
- <Route path="/" component={ App }>
+ <Route path="/">
<IndexRoute component={ Home } />
... |
4ec522e21161c5b01143476b93606b8f38391013 | app-shell-demo/src/components/app.jsx | app-shell-demo/src/components/app.jsx | import React from 'react';
import Footer from './footer';
import Header from './header';
export default class App extends React.Component {
render() {
return (
<div>
<Header/>
{this.props.children}
<Footer/>
</div>
);
}
}
| import React from 'react';
import Footer from './footer';
import Header from './header';
export default class App extends React.Component {
render() {
return (
<div>
{this.props.children}
</div>
);
}
}
| Remove the header/footer for the time being. | Remove the header/footer for the time being.
| JSX | apache-2.0 | marco-c/sw-precache,GoogleChromeLabs/sw-precache,GoogleChromeLabs/sw-precache,marco-c/sw-precache | ---
+++
@@ -7,9 +7,7 @@
render() {
return (
<div>
- <Header/>
{this.props.children}
- <Footer/>
</div>
);
} |
77833e570b394a835b1065200f101c3e88e2345f | client/src/components/CustomizationWidget/index.jsx | client/src/components/CustomizationWidget/index.jsx | import React, { Component } from 'react';
import StickerListContainer from '../../containers/StickerListContainer';
import ProductContainer from '../../containers/ProductContainer';
import Pagination from '../Pagination';
import './CustomizationWidget.scss';
const defaultProps = {
};
class CustomizationWidget extends... | import React, { Component } from 'react';
import StickerListContainer from '../../containers/StickerListContainer';
import ProductContainer from '../../containers/ProductContainer';
import Pagination from '../Pagination';
import './CustomizationWidget.scss';
const defaultProps = {
};
class CustomizationWidget extends... | Change input placeholder from 'Find Stickers' to 'Search stickers' | Change input placeholder from 'Find Stickers' to 'Search stickers'
| JSX | mit | marlonbernardes/coding-stickers,marlonbernardes/coding-stickers | ---
+++
@@ -17,7 +17,7 @@
<ProductContainer />
<div className="content stickers">
<div className="stickers-search">
- <input placeholder="Find stickers" onChange={onChangeFilter}/>
+ <input placeholder="Search stickers" onChange={onChangeFilter}/>
</div>
... |
0e2ee7e8785c10173f492d00f8916ce520bd231f | src/components/SideMenu.jsx | src/components/SideMenu.jsx | import React from 'react';
export default function SideMenu() {
return (
<div className="pane-sm sidebar">
<nav className="nav-group">
<h5 className="nav-group-title">Recent Files</h5>
<span className="nav-group-item">
<span className="icon icon-doc-text" />
file
... | import React from 'react';
export default class SideMenu extends React.Component {
constructor() {
super();
this.state = {
};
}
render() {
return (
<div className="pane-sm sidebar">
<nav className="nav-group">
<h5 className="nav-group-title">Recent Files</h5>
<... | Change Sidemenu to class from pure function | Change Sidemenu to class from pure function
| JSX | mit | tanaka0325/dropnote,tanaka0325/dropnote | ---
+++
@@ -1,31 +1,39 @@
import React from 'react';
-export default function SideMenu() {
- return (
- <div className="pane-sm sidebar">
+export default class SideMenu extends React.Component {
+ constructor() {
+ super();
+ this.state = {
+ };
+ }
- <nav className="nav-group">
- <h5 ... |
7aef9152265acda25eabd13d12b002b141620ef0 | src/components/board.jsx | src/components/board.jsx | import React from 'react';
import Tile from './tile';
require('./css/board.css');
export default class Board extends React.Component {
render() {
return (
<div id="board">
{
// Generate tiles for board.
this.props.board.map((index) => {
return (
<Tile/>
);
})
}
</div... | import React from 'react';
import Tile from './tile';
require('./css/board.css');
export default class Board extends React.Component {
render() {
return (
<div id="board">
{
// Generate tiles for board.
this.props.board.map((index) => {
return (
<Tile/>
);
})
}
</div... | Remove extra declaration of Board. | Remove extra declaration of Board.
| JSX | mit | aelawson/tic_tac_toe,aelawson/tic_tac_toe | ---
+++
@@ -19,20 +19,3 @@
);
}
}
-
-export default class Board extends React.Component {
- render() {
- return (
- <div id="board">
- {
- // Generate tiles for board.
- this.props.board.map((index) => {
- return (
- <Tile/>
- );
- })
- }
- </div>
- );
- }
-} |
eb5e313f0161ff0d10ff7b33ecfacc2ee8167082 | assets-server/components/shared/header.jsx | assets-server/components/shared/header.jsx | import React from 'react/addons';
import Styles from 'react-style';
const styles = Styles.create({
contStyle : {
padding : '8px 0 0 0',
maxWidth : '1218px',
margin : '0 auto'
}
});
export default class Header extends React.Component {
constructor(props) {
super(props);
},
render() {
cons... | import React from 'react/addons';
import InlineStyles from 'react-style';
const is = InlineStyles.create({
isContainer : {
padding : '8px 0 0 0',
maxWidth : '1218px',
margin : '0 auto'
}
});
export default class Header extends React.Component {
constructor(props) {
super(props);
},
render() ... | Change name of inline styles variable | Change name of inline styles variable
| JSX | mit | renemonroy/es6-scaffold,renemonroy/es6-scaffold | ---
+++
@@ -1,8 +1,8 @@
import React from 'react/addons';
-import Styles from 'react-style';
+import InlineStyles from 'react-style';
-const styles = Styles.create({
- contStyle : {
+const is = InlineStyles.create({
+ isContainer : {
padding : '8px 0 0 0',
maxWidth : '1218px',
margin : '0 auto'
@@... |
4d8f25c854c36d90dbfc486c5c4cfbabf29fb7b2 | src/js/components/SharedComponents/DiscreteProgressBarComponent.jsx | src/js/components/SharedComponents/DiscreteProgressBarComponent.jsx | /**
* DiscreteProgressBarComponent.jsx
* Created by Katie Rose 12/17/15
**/
import React, { PropTypes } from 'react';
const propTypes = {
progressCurrentStep: PropTypes.Number,
progressTotalSteps: PropTypes.Number
};
// to do: complete implementation of inputLength prop
const defaultProps = {
progressC... | /**
* DiscreteProgressBarComponent.jsx
* Created by Katie Rose 12/17/15
**/
import React, { PropTypes } from 'react';
const propTypes = {
progressCurrentStep: PropTypes.Number,
progressTotalSteps: PropTypes.Number
};
// to do: complete implementation of inputLength prop
const defaultProps = {
progressC... | Set progress bar to use passed variables | Set progress bar to use passed variables
| JSX | cc0-1.0 | fedspendingtransparency/data-act-broker-web-app,fedspendingtransparency/data-act-broker-web-app | ---
+++
@@ -25,12 +25,18 @@
}
render() {
+ var progress = [];
+
+ for (var i = 0; i < this.props.progressTotalSteps; i++){
+ if ((i+1) == this.props.progressCurrentStep)
+ progress.push(<div className="usa-da-progress-step usa-da-progress-one-fourth usa-da-progress-... |
3bc0d08f020a55d2a135082af86982d23e52071d | src/request/components/request-entry-list-item-view.jsx | src/request/components/request-entry-list-item-view.jsx | var React = require('react'),
Timeago = require('../../lib/components/timeago.jsx');
module.exports = React.createClass({
render: function() {
var entry = this.props.entry;
return (
<div className="request-entry-item-holder">
<table className="table table-bordered">
... | var glimpse = require('glimpse'),
React = require('react'),
Timeago = require('../../lib/components/timeago.jsx');
module.exports = React.createClass({
render: function() {
var entry = this.props.entry;
return (
<div className="request-entry-item-holder" onClick={this.onSelect}>... | Add click event for when a request is selected | Add click event for when a request is selected
| JSX | unknown | avanderhoorn/Glimpse.Client.Prototype,avanderhoorn/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype | ---
+++
@@ -1,11 +1,12 @@
-var React = require('react'),
+var glimpse = require('glimpse'),
+ React = require('react'),
Timeago = require('../../lib/components/timeago.jsx');
module.exports = React.createClass({
render: function() {
var entry = this.props.entry;
return (
- ... |
20059eae8851834ca16414a0ba4c8528bdd0e834 | packages/lesswrong/components/common/DraftJSRenderer.jsx | packages/lesswrong/components/common/DraftJSRenderer.jsx | import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { registerComponent, Components, Utils } from 'meteor/vulcan:core';
import { convertFromRaw } from 'draft-js';
class DraftJSRenderer extends PureComponent {
render() {
let htmlBody = {__html: "<span>No description</span>"}
... | import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { registerComponent, Components } from 'meteor/vulcan:core';
import { convertFromRaw } from 'draft-js';
import { draftToHTML } from '../../lib/editor/utils.js'
class DraftJSRenderer extends PureComponent {
render() {
let htm... | Change import of draft-js renderer | Change import of draft-js renderer
| JSX | mit | Discordius/Telescope,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2 | ---
+++
@@ -1,14 +1,15 @@
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
-import { registerComponent, Components, Utils } from 'meteor/vulcan:core';
+import { registerComponent, Components } from 'meteor/vulcan:core';
import { convertFromRaw } from 'draft-js';
+import { draftToHT... |
b61da859d723e85035ae7425e5cdb27f72703b1e | src/js/components/App.jsx | src/js/components/App.jsx | import React from 'react';
import Header from './Header.jsx';
import DateHeader from './DateHeader.jsx';
import Diary from './Diary.jsx';
import TasksContainer from '../containers/TasksContainer.jsx';
import Utils from '../utils.js';
export default class App extends React.Component {
constructor(props) {
super... | import React from 'react';
import Header from './Header.jsx';
import DateHeader from './DateHeader.jsx';
import Diary from './Diary.jsx';
import TasksContainer from '../containers/TasksContainer.jsx';
import Utils from '../utils.js';
export default class App extends React.Component {
constructor(props) {
super... | Change date state from string to date | Change date state from string to date
| JSX | mit | tanaka0325/nippo-web,tanaka0325/nippo-web | ---
+++
@@ -13,9 +13,7 @@
const today = new Date();
this.state = {
- date: `${today.getFullYear()}-\
- ${Utils.paddingZero(today.getMonth() + 1)}-\
- ${Utils.paddingZero(today.getDate())}`.replace(/\s/g, ''),
+ date: today,
};
}
@@ -26,8 +24,8 @@
<DateH... |
28414a516775c9f7d6d1daf6cc92c9f084df4e9e | src/ui/component/fileActions/view.jsx | src/ui/component/fileActions/view.jsx | // @flow
import * as MODALS from 'constants/modal_types';
import * as ICONS from 'constants/icons';
import React from 'react';
import Button from 'component/button';
import Tooltip from 'component/common/tooltip';
type Props = {
uri: string,
claimId: string,
openModal: (id: string, { uri: string }) => void,
cl... | // @flow
import * as MODALS from 'constants/modal_types';
import * as ICONS from 'constants/icons';
import React from 'react';
import Button from 'component/button';
import Tooltip from 'component/common/tooltip';
type Props = {
uri: string,
claimId: string,
openModal: (id: string, { uri: string }) => void,
cl... | Fix report button to use new route | Fix report button to use new route
New route: https://lbry.com/dmca/116d62d14d8efc311e1f8a9de92dcbc17deb259a | JSX | mit | lbryio/lbry-electron,lbryio/lbry-app,lbryio/lbry-app,lbryio/lbry-electron,lbryio/lbry-electron | ---
+++
@@ -31,7 +31,7 @@
)}
{!claimIsMine && (
<Tooltip label={__('Report content')}>
- <Button button="link" icon={ICONS.REPORT} href={`https://lbry.com/dmca?claim_id=${claimId}`} />
+ <Button button="link" icon={ICONS.REPORT} href={`https://lbry.com/dmca/${claimId... |
7e2100f3807749e154f60d9dc313d41c5de23052 | client/components/App.jsx | client/components/App.jsx | import React from 'react';
export default class App extends React.Component {
render() {
return <h1>sdsdasdasdsdsdasd</h1>
}
}
| import React from 'react';
export default class App extends React.Component {
render() {
return (
<p>
Lo there, do I see my father, <br />
Lo there, do I see my mother, my sisters and brothers, <br />
Lo there, do I see the line of my people, back to the beginning, <br />
Lo... | Add the necessary welcome text | Add the necessary welcome text
| JSX | mit | vikingsofcode/react-project-template | ---
+++
@@ -2,6 +2,14 @@
export default class App extends React.Component {
render() {
- return <h1>sdsdasdasdsdsdasd</h1>
+ return (
+ <p>
+ Lo there, do I see my father, <br />
+ Lo there, do I see my mother, my sisters and brothers, <br />
+ Lo there, do I see the line of my p... |
7160b6219896cd140876f699724e81bdafeef067 | src/index.jsx | src/index.jsx | import {DelegateContainer} from 'preact-delegate'
import {h, render} from 'preact'
import {Provider} from 'preact-redux'
import {BrowserRouter} from 'react-router-dom'
import {createStore} from 'redux'
import {reducer} from './reducer/index'
import '../styles/styles.css'
import {App} from './app'
const store = createS... | import {DelegateContainer} from 'preact-delegate'
import {h, render} from 'preact'
import {Provider} from 'preact-redux'
import {BrowserRouter} from 'react-router-dom'
import {createStore} from 'redux'
import {reducer} from './reducer/index'
import '../styles/styles.css'
import {App} from './app'
const store = createS... | Add react dev tools support | Add react dev tools support
| JSX | mit | Holi0317/bridge-calc,Holi0317/bridge-calc,Holi0317/bridge-calc | ---
+++
@@ -24,3 +24,7 @@
render(<Root />, document.body)
const spinner = document.querySelector('.splash')
document.body.removeChild(spinner)
+
+if (process.env.NODE_ENV !== 'production') {
+ require('preact/devtools')
+} |
2070d618f2ef62b72933474c2ca8e6d1450d718a | src/components/notes/Note.jsx | src/components/notes/Note.jsx | import React from 'react';
import './Note.scss';
import noteRepository from '../../data/NoteRepository';
export default class Note extends React.Component {
remove() {
noteRepository.remove(this.props, err => {
// TODO: inform user
if (err) throw err;
});
}
render() {
// console.log(this... | import React from 'react';
import './Note.scss';
import noteRepository from '../../data/NoteRepository';
export default class Note extends React.Component {
remove() {
noteRepository.remove(this.props, err => {
// TODO: inform user
if (err) throw err;
});
}
render() {
// console.log(this... | Comment out stateless function component | Comment out stateless function component
| JSX | mit | emyarod/refuge,emyarod/refuge | ---
+++
@@ -26,3 +26,22 @@
);
}
}
+
+// export default function Note({ title, content }) {
+// const remove = () => {
+// console.log('hi');
+// }
+//
+// return (
+// <div className="note">
+// <h1>{title}</h1>
+// <pre>{content}</pre>
+// <button type="button" onClick={remov... |
ca6a4973688d84be1396a75ae83ea278296e01ac | src/app/elements/ContentHtml/index.jsx | src/app/elements/ContentHtml/index.jsx | /* eslint-disable react/no-danger */
import React from 'react';
import cheerio from 'cheerio';
import CaptureLinks from '../CaptureLinks';
import * as libs from '../../libs';
const ContentHtml = ({ html, linksColor }) => {
const $ = cheerio.load(html);
$('a').attr('style', `color: ${libs.darkenColor(linksColor)};`... | /* eslint-disable react/no-danger, no-undef */
import React from 'react';
import cheerio from 'cheerio';
import CaptureLinks from '../CaptureLinks';
import * as libs from '../../libs';
const ContentHtml = ({ html, linksColor }) => {
const $ = cheerio.load(html);
$('a').attr('style', `color: ${libs.darkenColor(link... | Add cors if protocol is https | Add cors if protocol is https
| JSX | mit | worona/starter-pro-app-theme-worona | ---
+++
@@ -1,4 +1,4 @@
-/* eslint-disable react/no-danger */
+/* eslint-disable react/no-danger, no-undef */
import React from 'react';
import cheerio from 'cheerio';
import CaptureLinks from '../CaptureLinks';
@@ -7,6 +7,14 @@
const ContentHtml = ({ html, linksColor }) => {
const $ = cheerio.load(html);
$... |
cf1d452ef7d4f4dab2edd1aab374679944a6b162 | apps/gort/src/components/broadcasts/BroadcastCreate.jsx | apps/gort/src/components/broadcasts/BroadcastCreate.jsx |
import React from "react";
import SK from "../../SK";
import SKField from "../SKField";
export default class BroadcastCreate extends React.Component{
constructor(params) {
super(params);
this.state = {};
}
reset() {
this.setState({
newBroadcast: {
title: "",
url: "",
... |
import React from "react";
import SK from "../../SK";
import SKField from "../SKField";
export default class BroadcastCreate extends React.Component{
constructor(params) {
super(params);
this.state = {};
this.reset();
}
reset() {
this.setState({
newBroadcast: {
title: "",
... | Fix broadcast creation default fields | Fix broadcast creation default fields
| JSX | apache-2.0 | streamkitchen/streamkitchen,streamplace/streamplace,streamkitchen/streamkitchen,streamplace/streamplace,streamplace/streamplace,streamkitchen/streamkitchen | ---
+++
@@ -8,6 +8,7 @@
constructor(params) {
super(params);
this.state = {};
+ this.reset();
}
reset() { |
e4d8f3d06c2591a00fe95bda02fd257db4f9a2d5 | src/sentry/static/sentry/app/views/groupDetails/seenBy.jsx | src/sentry/static/sentry/app/views/groupDetails/seenBy.jsx | /*** @jsx React.DOM */
var React = require("react");
var Gravatar = require("../../components/gravatar");
var GroupState = require("../../mixins/groupState");
var GroupSeenBy = React.createClass({
mixins: [GroupState],
render() {
var group = this.getGroup();
var seenByNodes = group.seenBy.map((user, us... | /*** @jsx React.DOM */
var React = require("react");
var Gravatar = require("../../components/gravatar");
var GroupState = require("../../mixins/groupState");
var GroupSeenBy = React.createClass({
mixins: [GroupState],
render() {
var group = this.getGroup();
var seenByNodes = group.seenBy.map((user, us... | Remove count from seen by | Remove count from seen by
| JSX | bsd-3-clause | zenefits/sentry,daevaorn/sentry,mitsuhiko/sentry,wong2/sentry,ifduyue/sentry,fuziontech/sentry,mvaled/sentry,gencer/sentry,JackDanger/sentry,hongliang5623/sentry,nicholasserra/sentry,korealerts1/sentry,mitsuhiko/sentry,imankulov/sentry,hongliang5623/sentry,JackDanger/sentry,BayanGroup/sentry,gencer/sentry,daevaorn/sent... | ---
+++
@@ -26,7 +26,7 @@
return (
<div className="seen-by">
<ul>
- <li><span className="icon-eye"></span> 23</li>
+ <li><span className="icon-eye" /></li>
{seenByNodes}
</ul>
</div> |
0919b897f518f8ea5c2026c1a168d1288e4344a1 | app/app/components/home/Home.jsx | app/app/components/home/Home.jsx | import React from 'react'
import UnregisteredHome from './UnregisteredHome.jsx'
export default class Home extends React.Component {
render(){
return (
<UnregisteredHome />
)
}
} | import React from 'react'
import UnregisteredHome from './UnregisteredHome.jsx'
import RegisteredUserHome from './RegisteredUserHome.jsx'
import auth from '../../utils/auth.jsx'
export default class Home extends React.Component {
constructor(){
super();
this.state = {
user: null
}
}
componentWillMount(){
... | Refactor for registered and unregistered users | Refactor for registered and unregistered users
| JSX | mit | taodav/MicroSerfs,taodav/MicroSerfs | ---
+++
@@ -1,10 +1,31 @@
import React from 'react'
import UnregisteredHome from './UnregisteredHome.jsx'
+import RegisteredUserHome from './RegisteredUserHome.jsx'
+import auth from '../../utils/auth.jsx'
export default class Home extends React.Component {
+ constructor(){
+ super();
+ this.state = {
+ user... |
2849d9b281e1a5222a36859fa51696f2ffc605cb | src/components/ProtectedRoute/index.jsx | src/components/ProtectedRoute/index.jsx | import React from 'react';
import PropTypes from 'prop-types';
import { Route, Redirect } from 'react-router-dom';
class ProtectedRoute extends React.PureComponent {
render() {
const { component: Component, ...rest } = this.props;
return (
<Route
{...rest}
render={props => (
... | import React from 'react';
import PropTypes from 'prop-types';
import { Route, Redirect } from 'react-router-dom';
class ProtectedRoute extends React.Component {
render() {
const { component: Component, ...rest } = this.props;
return (
<Route
{...rest}
render={props => (
loca... | Fix protected route not having lifecycle events | fix(routing): Fix protected route not having lifecycle events
| JSX | mit | robcalcroft/mondoweb,robcalcroft/mondoweb,robcalcroft/monzoweb,robcalcroft/monzoweb | ---
+++
@@ -2,7 +2,7 @@
import PropTypes from 'prop-types';
import { Route, Redirect } from 'react-router-dom';
-class ProtectedRoute extends React.PureComponent {
+class ProtectedRoute extends React.Component {
render() {
const { component: Component, ...rest } = this.props;
|
0b1d73a954a0e231e5697e5ab46826b838d3dd27 | app/assets/javascripts/components/common/ArticleViewer/components/ParsedArticle.jsx | app/assets/javascripts/components/common/ArticleViewer/components/ParsedArticle.jsx | import React from 'react';
import PropTypes from 'prop-types';
export const ParsedArticle = ({ highlightedHtml, whocolorHtml, parsedArticle }) => {
const articleHTML = highlightedHtml || whocolorHtml || parsedArticle;
return (
<div className="parsed-article" dangerouslySetInnerHTML={{ __html: articleHTML }} />... | import React from 'react';
import PropTypes from 'prop-types';
const wikilinkMatcher = new RegExp('<a href=', 'g');
const blankTargetLink = '<a target="_blank" href=';
export const ParsedArticle = ({ highlightedHtml, whocolorHtml, parsedArticle }) => {
let articleHTML = highlightedHtml || whocolorHtml || parsedArt... | Add target="_blanks" to typical links in ArticleViewer | Add target="_blanks" to typical links in ArticleViewer
This cleanly handles standard wikilinks in Wikipedia articles, so that clicking one will open the Wikipedia article in a new tab instead of navigating the user away from the Dashboard.
Wikidata links, however, are formatted differently, with a `title` attribute b... | JSX | mit | WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard | ---
+++
@@ -1,8 +1,17 @@
import React from 'react';
import PropTypes from 'prop-types';
+
+const wikilinkMatcher = new RegExp('<a href=', 'g');
+const blankTargetLink = '<a target="_blank" href=';
+
export const ParsedArticle = ({ highlightedHtml, whocolorHtml, parsedArticle }) => {
- const articleHTML = highli... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.