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 |
|---|---|---|---|---|---|---|---|---|---|---|
93ea0ce82a8542db58bc48984cd601b9d11f56a8 | src/components/App/App.jsx | src/components/App/App.jsx | import React from 'react';
import ModifierList from '../ModifierList';
import EventLightList from '../EventLightList';
import EventDetailsList from '../EventDetailsList';
import TestArea from '../TestArea';
const App = () => (
<div>
<h1>Keyboard</h1>
<h2>Active Modifiers</h2>
<p>Determined using <a href="https... | import React from 'react';
import ModifierList from '../ModifierList';
import EventLightList from '../EventLightList';
import EventDetailsList from '../EventDetailsList';
import TestArea from '../TestArea';
const App = () => (
<div>
<h1>Keyboard</h1>
<h2>Active Modifiers</h2>
<TestArea />
<p>Determined using... | Add test area to active modifiers section | Add test area to active modifiers section
| JSX | mit | j-/keyboard,j-/keyboard | ---
+++
@@ -9,6 +9,7 @@
<h1>Keyboard</h1>
<h2>Active Modifiers</h2>
+ <TestArea />
<p>Determined using <a href="https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/getModifierState" title="'KeyboardEvent.getModifierState()' on MDN"><code>KeyboardEvent.getModifierState()</code></a>. Press any ke... |
bfd14a115a2fb3b5d0f581488326bf6aa0580b42 | src/views/preview/studio-list.jsx | src/views/preview/studio-list.jsx | const React = require('react');
const PropTypes = require('prop-types');
const FormattedMessage = require('react-intl').FormattedMessage;
const FlexRow = require('../../components/flex-row/flex-row.jsx');
const ThumbnailColumn = require('../../components/thumbnailcolumn/thumbnailcolumn.jsx');
const projectShape = requi... | const React = require('react');
const PropTypes = require('prop-types');
const FormattedMessage = require('react-intl').FormattedMessage;
const FlexRow = require('../../components/flex-row/flex-row.jsx');
const ThumbnailColumn = require('../../components/thumbnailcolumn/thumbnailcolumn.jsx');
const projectShape = requi... | Fix the studio links to use the correct URL | Fix the studio links to use the correct URL
| JSX | bsd-3-clause | LLK/scratch-www,LLK/scratch-www | ---
+++
@@ -20,7 +20,7 @@
<ThumbnailColumn
cards
showAvatar
- itemType="studio"
+ itemType="studios"
items={studios.slice(0, 5)}
showFavorites={false}
showLov... |
642b93b66bac9dc9f4d9e54c20824adef7d046e8 | src/client/modules/Contacts/ContactDocuments/ContactDocuments.jsx | src/client/modules/Contacts/ContactDocuments/ContactDocuments.jsx | import React from 'react'
import styled from 'styled-components'
import { SPACING } from '@govuk-react/constants'
import { typography } from '@govuk-react/lib'
import ContactResource from '../../../components/Resource/Contact'
import { NewWindowLink } from '../../../components'
const StyledSectionHeader = styled('div... | import React from 'react'
import ContactResource from '../../../components/Resource/Contact'
import DocumentsSection from '../../../components/DocumentsSection'
const ContactDocuments = ({ contactId, archivedDocumentPath }) => {
return (
<ContactResource id={contactId}>
{(contact) => (
<DocumentsS... | Rewrite contact documents page to use new component | Rewrite contact documents page to use new component
| JSX | mit | uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2 | ---
+++
@@ -1,37 +1,16 @@
import React from 'react'
-import styled from 'styled-components'
-import { SPACING } from '@govuk-react/constants'
-import { typography } from '@govuk-react/lib'
import ContactResource from '../../../components/Resource/Contact'
-import { NewWindowLink } from '../../../components'
-
-co... |
420d2d183149b35da4ec2a5aa8a15a8b41e348ff | source/assets/javascripts/_components/modal.jsx | source/assets/javascripts/_components/modal.jsx | var Modal = React.createClass({
hijriDateString: function () {
if (this.props.day && this.props.day.hijri) {
var day = this.props.day.hijri;
return day.date.toString() + " " + HijriDate.getMonthName(day.month) + " " + day.year.toString() + "H";
}
},
gregorianDateString: function () {
if (t... | var Modal = React.createClass({
hijriDateString: function () {
if (this.props.day && this.props.day.hijri) {
var day = this.props.day.hijri;
return day.date.toString() + " " + HijriDate.getMonthName(day.month) + " " + day.year.toString() + "H";
}
},
gregorianDateString: function () {
if (t... | Use spread attributes to transfer properties. | Use spread attributes to transfer properties. | JSX | mit | mygulamali/mumineen_calendar_js,mygulamali/mumineen_calendar_js,mygulamali/mumineen_calendar_js,mygulamali/mumineen_calendar_js | ---
+++
@@ -20,7 +20,7 @@
<label className="modal-close" htmlFor="modal-checkbox"></label>
<h3>{this.hijriDateString()}</h3>
<h4>{this.gregorianDateString()}</h4>
- <MiqaatList day={this.props.day} miqaats={this.props.miqaats} />
+ <MiqaatList {...this.prop... |
f9747548e02769b525ea0b6ce1930698c7a7adac | app/assets/javascripts/components/trial.js.jsx | app/assets/javascripts/components/trial.js.jsx | class Trial extends React.Component {
constructor() {
super()
this._toggleDiv = this._toggleDiv.bind(this)
}
_toggleDiv() {
$(`#${this.props.trial.id}`).slideToggle()
}
render() {
const briefTitle = this.props.trial.brief_title;
const studyId = this.props.trial.id;
const recruitingSt... | class Trial extends React.Component {
constructor() {
super()
this._toggleDiv = this._toggleDiv.bind(this)
}
_toggleDiv() {
$(`#${this.props.trial.id}`).slideToggle()
}
checkContact() {
const contactName = this.props.trial.overall_contact_name;
const contactPhone = this.props.trial.overa... | Add logic for conditionally displaying contact info | Add logic for conditionally displaying contact info
| JSX | mit | danmckeon/crconnect,danmckeon/crconnect,danmckeon/crconnect | ---
+++
@@ -8,25 +8,36 @@
$(`#${this.props.trial.id}`).slideToggle()
}
+ checkContact() {
+ const contactName = this.props.trial.overall_contact_name;
+ const contactPhone = this.props.trial.overall_contact_phone;
+ const contactEmail = this.props.trial.overall_contact_email;
+
+ if (contactNam... |
34e30557bee3b4f54c8bbf5313bbd493a5c60d08 | src/components/home.jsx | src/components/home.jsx | /**
* Home
*
* Home page with list of cats. Extends CatPage
*/
import { connect } from 'react-redux';
import { push } from 'redux-router';
import CatPage from './cat-page';
const title = 'All categories';
const subtitle = 'Click on your favourite cat to see all the images';
function onCatClick(e, cat) {
return ... | /**
* Home
*
* Home page with list of cats. Extends CatPage
*/
import { connect } from 'react-redux';
import { push } from 'redux-router';
import CatPage from './cat-page';
const title = 'All categories';
const subtitle = 'Click on your favourite cat to see all the images';
function onCatClick(e, cat) {
return ... | Fix cat breed page href | Fix cat breed page href
| JSX | mit | mariolamacchia/react-exercise,mariolamacchia/react-exercise | ---
+++
@@ -11,7 +11,7 @@
const subtitle = 'Click on your favourite cat to see all the images';
function onCatClick(e, cat) {
- return push({ pathname: '/' + cat.breed });
+ return push({ pathname: cat.breed });
}
function mapStateToProps(state) { |
6ec570b03767e0308c4e6e7e715ac8b25b3c7a7f | client/main/main.jsx | client/main/main.jsx | require('./main.styl');
import { Router, Route, hashHistory, IndexRoute } from 'react-router'
import Book from '../book/book.jsx'
import Library from '../library/library.jsx'
import Nav from '../nav/nav.jsx'
import Profile from '../profile/profile.jsx'
import Storage from '../storage/storage.jsx'
render((
<Router h... | require('./main.styl');
import { render } from 'react-dom'
import { Router, Route, hashHistory, IndexRoute } from 'react-router'
import Book from '../book/book.jsx'
import Library from '../library/library.jsx'
import Nav from '../nav/nav.jsx'
import Profile from '../profile/profile.jsx'
import Storage from '../storage... | Revert "rm import { render } from 'react-dom'" | Revert "rm import { render } from 'react-dom'"
This reverts commit a2705afe1bc8a0e60349d5a0b3f62004b856e8ce.
| JSX | mit | bookangeles/hackathon,bookangeles/hackathon | ---
+++
@@ -1,5 +1,6 @@
require('./main.styl');
+import { render } from 'react-dom'
import { Router, Route, hashHistory, IndexRoute } from 'react-router'
import Book from '../book/book.jsx'
import Library from '../library/library.jsx' |
40240bf3005e7dd84a5751ea1f6239a3d6d6e520 | app/scripts/components/navigation.jsx | app/scripts/components/navigation.jsx | import React from 'react';
import PropTypes from 'prop-types';
import { Link } from 'react-router';
export default function Navigation({ loggedIn, showMenu, hideMenu, hideHome, simple }) {
return (
<nav className={simple ? "wrapper centerify" : "menu-wrap"} style={{left: (showMenu ? '0px' : '100%')}} onCli... | import React from 'react';
import PropTypes from 'prop-types';
import { Link } from 'react-router';
export default function Navigation({ loggedIn, showMenu, hideMenu, hideHome, simple }) {
return (
<nav className={simple ? "wrapper centerify" : "menu-wrap"} style={{left: (showMenu ? '0px' : '100%')}} onCli... | Remove link to invalid route | Remove link to invalid route
| JSX | mit | benct/tomlin-web,benct/tomlin-web | ---
+++
@@ -8,7 +8,6 @@
<ul className={`unselectable menu ${simple ? '' : 'menu-full'}`} style={{opacity: (showMenu ? 1 : 0)}}>
{ hideHome ? null : <li><Link to="/">Home</Link></li> }
<li><Link to="/files">Files</Link></li>
- <li><Link to="/links">Links</L... |
28383c405ded46195fc4a7b6cf09a6d1c0c76009 | src/app/stores/port-store.jsx | src/app/stores/port-store.jsx | var EventEmitter = require('events').EventEmitter;
var DashDispatcher = require('../dispatcher/dash-dispatcher');
var ActionTypes = require('../constants/action-types');
var available = [];
var loading = true;
var opening = false;
var selected = '';
var PortStore = new EventEmitter();
PortStore.emitChange = function... | var EventEmitter = require('events').EventEmitter;
var DashDispatcher = require('../dispatcher/dash-dispatcher');
var ActionTypes = require('../constants/action-types');
var _available = [];
var _loading = true;
var _opening = false;
var _selected = '';
var PortStore = new EventEmitter();
PortStore.emitChange = func... | Add _ tails to special store variables | Add _ tails to special store variables
| JSX | mit | ErnWong/pigeon-dash,ErnWong/pigeon-dash | ---
+++
@@ -2,10 +2,10 @@
var DashDispatcher = require('../dispatcher/dash-dispatcher');
var ActionTypes = require('../constants/action-types');
-var available = [];
-var loading = true;
-var opening = false;
-var selected = '';
+var _available = [];
+var _loading = true;
+var _opening = false;
+var _selected = '... |
4d7d0e495020a43e57458de18ff150bbdcc1d6a3 | src/mb/routes.jsx | src/mb/routes.jsx | import React from 'react';
import { IndexRoute, Route } from 'react-router';
import App from './containers/App';
import HomePage from './containers/HomePage';
import MoviePage from './containers/MoviePage';
export function configRoutes() {
return (
<Route path="/" component={App}>
<IndexRoute component={H... | import React from 'react';
import { IndexRoute, Route } from 'react-router';
import App from './containers/App';
import HomePage from './containers/HomePage';
import MoviePage from './containers/MoviePage';
import SearchPage from './containers/SearchPage';
export function configRoutes() {
return (
<Route path="... | Add search route in routers.js | Add search route in routers.js
| JSX | mit | NJU-SAP/movie-board,NJU-SAP/movie-board | ---
+++
@@ -4,11 +4,13 @@
import App from './containers/App';
import HomePage from './containers/HomePage';
import MoviePage from './containers/MoviePage';
+import SearchPage from './containers/SearchPage';
export function configRoutes() {
return (
<Route path="/" component={App}>
<IndexRoute com... |
0eccb2a2114ba27d7fc9f484df9286743c52848f | src/components/Sidebar.jsx | src/components/Sidebar.jsx | import React, {PropTypes} from "react";
import DatePicker from "react-date-picker";
import Moment from "moment";
import Fluxxor from "fluxxor";
const FluxMixin = Fluxxor.FluxMixin(React);
const Sidebar = React.createClass({
mixins: [FluxMixin],
/*getInitialState() {
return {date: this.props.date};
... | import React, {PropTypes} from "react";
import DatePicker from "react-date-picker";
import Moment from "moment";
import Fluxxor from "fluxxor";
const FluxMixin = Fluxxor.FluxMixin(React);
const Sidebar = React.createClass({
mixins: [FluxMixin],
/*getInitialState() {
return {date: this.props.date};
... | Add the ability to show all history by unsetting the date | Add the ability to show all history by unsetting the date
It is fired by clicking on the same date as the current date.
It is basically toggling the range filter.
| JSX | mit | MrSaints/historyx,MrSaints/historyx | ---
+++
@@ -14,8 +14,11 @@
handleDateChange(s, m) {
const flux = this.getFlux();
- const date = m.toDate();
+ let date = m.toDate();
//this.setState({date: m});
+ if (m.isSame(this.props.date, "day")) {
+ date = 0;
+ }
flux.actions.search.change... |
677f728e85a0ad5487aa42403becaa4340685c80 | src/client/containers/ThreadPanel.jsx | src/client/containers/ThreadPanel.jsx | import React, { Component } from "react";
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import Thread from "../components/Thread";
// Actions
import { closeThread } from '../actions/ThreadActions';
class ThreadPanel extends Component {
render() {
const { closeThread, ... | import React, { Component } from "react";
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import Thread from "../components/Thread";
import ThreadControls from "../components/ThreadControls";
// Actions
import { closeThread } from '../actions/ThreadActions';
class ThreadPanel exten... | Add initial thread controls to thread container | Add initial thread controls to thread container
| JSX | mit | AdamSalma/Lurka,AdamSalma/Lurka | ---
+++
@@ -3,6 +3,7 @@
import { connect } from 'react-redux';
import Thread from "../components/Thread";
+import ThreadControls from "../components/ThreadControls";
// Actions
import { closeThread } from '../actions/ThreadActions';
@@ -18,6 +19,11 @@
thread={thread} isActive={thread.is... |
0742f02e92ff2f29c0b956288a5baed103e7c980 | src/client/components/ThreadPost/ThreadPost.jsx | src/client/components/ThreadPost/ThreadPost.jsx | import React from 'react';
import {
createMediaIfExists
} from './Media'
export default function ({post, children}) {
const { id, title, date, imgsrc, comment, ext } = post
const SRC = imgsrc
const ID = 'post-media-' + id
return (
<div id={"p"+id} className='thread-post'>
... | import React from 'react';
import uuid from 'uuid'
import {
createMediaIfExists
} from './Media'
export default function ({post, children}) {
const { id, title, date, imgsrc, comment, ext, references } = post
const SRC = imgsrc
const ID = 'post-media-' + id
return (
<div id={... | Add backrefs to thread posts; check who refered | Add backrefs to thread posts; check who refered
| JSX | mit | AdamSalma/Lurka,AdamSalma/Lurka | ---
+++
@@ -1,10 +1,11 @@
import React from 'react';
+import uuid from 'uuid'
import {
createMediaIfExists
} from './Media'
export default function ({post, children}) {
- const { id, title, date, imgsrc, comment, ext } = post
+ const { id, title, date, imgsrc, comment, ext, references } = post
... |
89f07c130823feae97e725a66f1563e3f3456ded | client/components/index.jsx | client/components/index.jsx | var React = require('react');
var ReactDOM = require('react-dom');
var sharedb = require('sharedb/lib/client');
var App = require('./App.jsx');
var Init = require('./initdoc');
// Open WebSocket connection to ShareDB server
connection = new sharedb.Connection(new WebSocket('ws://' + window.location.host));
// Expose... | var React = require('react');
var ReactDOM = require('react-dom');
var sharedb = require('sharedb/lib/client');
var App = require('./App.jsx');
var Init = require('./initdoc');
// Open WebSocket connection to ShareDB server
connection = new sharedb.Connection(new WebSocket('wss://' + window.location.host));
// Expos... | Change to a secure WS connection | Change to a secure WS connection
| JSX | mit | venugos/sharegeom,venugos/sharegeom | ---
+++
@@ -6,7 +6,7 @@
// Open WebSocket connection to ShareDB server
-connection = new sharedb.Connection(new WebSocket('ws://' + window.location.host));
+connection = new sharedb.Connection(new WebSocket('wss://' + window.location.host));
// Expose to index.html
window.renderApp = function () { |
abb41c4c11228513a4262c774468ea2eebe717f1 | src/field/password/password_pane.jsx | src/field/password/password_pane.jsx | import React from 'react';
import PasswordInput from '../../ui/input/password_input';
import * as c from '../index';
import { swap, updateEntity } from '../../store/index';
import * as l from '../../lock/index';
import { setPassword } from '../password';
export default class PasswordPane extends React.Component {
h... | import React from 'react';
import PasswordInput from '../../ui/input/password_input';
import * as c from '../index';
import { swap, updateEntity } from '../../store/index';
import * as l from '../../lock/index';
import { setPassword } from '../password';
export default class PasswordPane extends React.Component {
h... | Remove dead code from PasswordPane | Remove dead code from PasswordPane
| JSX | mit | mike-casas/lock,mike-casas/lock,mike-casas/lock | ---
+++
@@ -8,13 +8,8 @@
export default class PasswordPane extends React.Component {
handleChange(e) {
- const { lock, onChange, policy } = this.props;
- if (onChange) {
- // TODO: are we using this?
- onChange(e)
- } else {
- swap(updateEntity, "lock", l.id(lock), setPassword, e.target.... |
bb99df4b9247b274e6765bd3ad277039cfaf28ad | src/components/InstructionsEditor.jsx | src/components/InstructionsEditor.jsx | import React from 'react';
import PropTypes from 'prop-types';
import {t} from 'i18next';
import bindAll from 'lodash/bindAll';
export default class InstructionsEditor extends React.Component {
constructor() {
super();
bindAll(this, '_handleCancelEditing', '_handleSaveChanges', '_ref');
}
_handleCancelE... | import React from 'react';
import PropTypes from 'prop-types';
import {t} from 'i18next';
import bindAll from 'lodash/bindAll';
export default class InstructionsEditor extends React.Component {
constructor() {
super();
bindAll(this, '_handleCancelEditing', '_handleSaveChanges', '_ref');
}
_handleCancelE... | Add _ prefix to this.editor to signify privateness | Add _ prefix to this.editor to signify privateness
| JSX | mit | jwang1919/popcode,jwang1919/popcode,outoftime/learnpad,popcodeorg/popcode,popcodeorg/popcode,popcodeorg/popcode,outoftime/learnpad,jwang1919/popcode,jwang1919/popcode,popcodeorg/popcode | ---
+++
@@ -14,12 +14,12 @@
}
_handleSaveChanges() {
- const newValue = this.editor.value.trim();
+ const newValue = this._editor.value.trim();
this.props.onSaveChanges(this.props.projectKey, newValue);
}
_ref(editorElement) {
- this.editor = editorElement;
+ this._editor = editorElem... |
cdb140b96832497bcf526614bbadcd1988fb2182 | docs/themes/theme-custom/theme/Prototyper/download-button.jsx | docs/themes/theme-custom/theme/Prototyper/download-button.jsx | import React from 'react';
import RasaButton from '../RasaButton';
import PrototyperContext from './context';
const DownloadButton = (props) => {
const prototyperContext = React.useContext(PrototyperContext);
return (
<RasaButton
onClick={prototyperContext.downloadProject}
disabled={!prototyperCo... | import React from 'react';
import RasaButton from '../RasaButton';
import PrototyperContext from './context';
const DownloadButton = (props) => {
const prototyperContext = React.useContext(PrototyperContext);
return (
<RasaButton
onClick={prototyperContext.downloadProject}
disabled={prototyperCon... | Fix download button in docs | Fix download button in docs
| JSX | apache-2.0 | RasaHQ/rasa_nlu,RasaHQ/rasa_nlu,RasaHQ/rasa_nlu | ---
+++
@@ -9,7 +9,7 @@
return (
<RasaButton
onClick={prototyperContext.downloadProject}
- disabled={!prototyperContext.hasTrained || !!prototyperContext.isTraining}
+ disabled={prototyperContext.chatState !== "ready" && prototyperContext.chatState !== "needs_to_be_retrained"}
{...prop... |
c4976de16496c7b7b3f62cb91cead8e48f291ae7 | src/index.jsx | src/index.jsx | import React from 'react';
import { render } from 'react-dom';
import { Route, Router, IndexRoute, hashHistory } from 'react-router';
// Material UI.
import injectTapEventPlugin from 'react-tap-event-plugin';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import getMuiTheme from 'material-ui/style... | import React from 'react';
import { render } from 'react-dom';
import { Route, Router, IndexRoute, hashHistory } from 'react-router';
// Material UI.
import injectTapEventPlugin from 'react-tap-event-plugin';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import getMuiTheme from 'material-ui/style... | Add about and examples routes | Add about and examples routes
| JSX | mit | juanhenriquez/react-weather-app,juanhenriquez/react-weather-app | ---
+++
@@ -13,6 +13,8 @@
// Child Components
import Weather from './components/Weather';
+import Examples from './components/Examples';
+import About from './components/About';
import './index.scss';
@@ -25,6 +27,8 @@
<Router history={ hashHistory }>
<Route path="/" component={ App }>
<... |
7b00693693428197b1a5fc78ccee4f09af420fe4 | lib/client/media/Media.jsx | lib/client/media/Media.jsx | import React from 'react';
import { connect } from 'react-redux';
import { fetchMedia } from './MediaActions';
import Card from '../components/Card';
class Media extends React.Component {
componentDidMount() {
this.props.dispatch(fetchMedia(this.props.params.mediaId));
}
render() {
if (this.props.isFetch... | import React from 'react';
import { connect } from 'react-redux';
import { goBack } from 'react-router-redux';
import { fetchMedia } from './MediaActions';
import Card from '../components/Card';
class Media extends React.Component {
constructor(props) {
super(props);
this.goBack = this.goBack.bind(this);
}... | Add back button on medias/:id screen | Add back button on medias/:id screen
| JSX | mit | dbrugne/ftp-nanny,dbrugne/ftp-nanny | ---
+++
@@ -1,11 +1,20 @@
import React from 'react';
import { connect } from 'react-redux';
+import { goBack } from 'react-router-redux';
import { fetchMedia } from './MediaActions';
import Card from '../components/Card';
class Media extends React.Component {
+ constructor(props) {
+ super(props);
+ thi... |
3c947d1358dedddda6068c27295e8c0e803712ae | BaragonUI/app/components/status/StatusPage.jsx | BaragonUI/app/components/status/StatusPage.jsx | import React from 'react';
import { connect } from 'react-redux';
import { browserHistory } from 'react-router';
import rootComponent from '../../rootComponent';
import { refresh } from '../../actions/ui/status';
import WorkerStatus from './WorkerStatus';
import PendingRequests from './PendingRequests';
import Request... | import React from 'react';
import { connect } from 'react-redux';
import { withRouter } from 'react-router';
import rootComponent from '../../rootComponent';
import { refresh } from '../../actions/ui/status';
import WorkerStatus from './WorkerStatus';
import PendingRequests from './PendingRequests';
import RequestSear... | Use react-router rather than browserHistory | Use react-router rather than browserHistory
Move to using react-router rather than directly modifying the
`browserHistory` object. This way is just a little bit neater.
| JSX | apache-2.0 | HubSpot/Baragon,HubSpot/Baragon,HubSpot/Baragon | ---
+++
@@ -1,6 +1,6 @@
import React from 'react';
import { connect } from 'react-redux';
-import { browserHistory } from 'react-router';
+import { withRouter } from 'react-router';
import rootComponent from '../../rootComponent';
import { refresh } from '../../actions/ui/status';
@@ -8,11 +8,11 @@
import Pend... |
7f9360c57d2df824e443c7f2e44b6a21c5d04fc2 | app/components/templates/Slidedeck.jsx | app/components/templates/Slidedeck.jsx | /* eslint one-var: 0 */
import React from 'react';
import BaseTemplate from './Base';
import Reveal from 'reveal.js';
import '../../scss/reveal.css';
import '../../scss/reveal-theme.css';
/**
* Slidedeck template
*/
export default class Slidedeck extends BaseTemplate {
getDefaultData() {
return {};
}
co... | /* eslint one-var: 0 */
import React from 'react';
import BaseTemplate from './Base';
import Reveal from 'reveal.js';
import '../../scss/reveal.css';
import '../../scss/reveal-theme.css';
/**
* Slidedeck template
*/
export default class Slidedeck extends BaseTemplate {
getDefaultData() {
return {
trans... | Add transition config in YAML front matter | Add transition config in YAML front matter
| JSX | mit | PaulDebus/monod,PaulDebus/monod,TailorDev/monod,TailorDev/monod,PaulDebus/monod,TailorDev/monod | ---
+++
@@ -12,7 +12,9 @@
export default class Slidedeck extends BaseTemplate {
getDefaultData() {
- return {};
+ return {
+ transition: 'zoom',
+ };
}
componentDidMount() {
@@ -22,10 +24,13 @@
slideNumber: true,
progress: false,
help: false,
+ margin: 0,
});... |
0dda71a1d96729abea9cdeef07f25f7f96c7b28c | client/ui/Home.jsx | client/ui/Home.jsx | import React from 'react'
import {Col, Container, Row} from 'reactstrap'
import {connect} from 'react-redux'
import Icon from 'assets/spidchain-icon'
import ShowQRCode from 'ui/ShowQRCode'
import Balance from 'ui/Balance'
const Home = ({did, wallet}) => {
return <Container fluid>
<Row className='mt-3'>
<C... | import React from 'react'
import {Col, Container, Row} from 'reactstrap'
import {connect} from 'react-redux'
import Icon from 'assets/spidchain-icon'
import ShowQRCode from 'ui/ShowQRCode'
import Balance from 'ui/Balance'
const Home = ({did, wallet}) => {
return <Container fluid>
<Row className='mt-3'>
<C... | Change resposive transition point in the home screen | Change resposive transition point in the home screen
| JSX | mit | SpidChain/spidchain-btcr,SpidChain/spidchain-btcr | ---
+++
@@ -9,19 +9,19 @@
const Home = ({did, wallet}) => {
return <Container fluid>
<Row className='mt-3'>
- <Col md='6' className='mx-auto'>
+ <Col sm='6' className='mx-auto'>
<Icon className='w-75 d-block mx-auto mt-3' alt='SpidChain icon' />
</Col>
</Row>
<Row classNam... |
250283e222eaf22283fd0d37fca00f195fba19c7 | lib/steps_components/options/OptionsStep.jsx | lib/steps_components/options/OptionsStep.jsx | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Option from './Option';
import OptionElement from './OptionElement';
import Options from './Options';
import OptionsStepContainer from './OptionsStepContainer';
class OptionsStep extends Component {
onOptionClick = ({ value }) => {
... | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Option from './Option';
import OptionElement from './OptionElement';
import Options from './Options';
import OptionsStepContainer from './OptionsStepContainer';
class OptionsStep extends Component {
onOptionClick = ({ value }) => {
... | Use object keys instead of values to support more browsers. | Use object keys instead of values to support more browsers.
| JSX | mit | LucasBassetti/react-simple-chatbot,LucasBassetti/react-simple-chatbot | ---
+++
@@ -38,7 +38,9 @@
return (
<OptionsStepContainer className="rsc-os">
<Options className="rsc-os-options">
- {Object.values(options).map(this.renderOption)}
+ {Object.keys(options).map(key => {
+ return options[key];
+ }).map(this.renderOption)}
... |
0294560193d8052d5a8f9e11d547fdea7a41ec9a | web/static/js/components/high_contrast_button.jsx | web/static/js/components/high_contrast_button.jsx | import React from "react"
import PropTypes from "prop-types"
import cx from "classnames"
import * as AppPropTypes from "../prop_types"
import styles from "./css_modules/high_contrast_button.css"
const HighContrastButton = props => {
const { actions, userOptions, className } = props
const wrapperClasses = cx(class... | import React from "react"
import PropTypes from "prop-types"
import cx from "classnames"
import * as AppPropTypes from "../prop_types"
import styles from "./css_modules/high_contrast_button.css"
const HighContrastButton = props => {
const { actions, userOptions, className } = props
const wrapperClasses = cx(class... | Add readOnly attr to controlled checkbox in HighContastButton | Add readOnly attr to controlled checkbox in HighContastButton
| JSX | mit | stride-nyc/remote_retro,stride-nyc/remote_retro,stride-nyc/remote_retro | ---
+++
@@ -13,7 +13,7 @@
<div className={wrapperClasses}>
<button className="ui basic compact icon button" type="button" onClick={actions.toggleHighContrastOn}>
<div className="ui toggle checkbox">
- <input type="checkbox" name="public" checked={userOptions.highContrastOn} />
+ ... |
6980a834e2659c2cabb5d236f4384bed785e7ec5 | src/routes/ProjectList.jsx | src/routes/ProjectList.jsx | import React from 'react';
import { Helmet } from 'react-helmet';
import projects from 'projects';
import ProjectTile from 'components/ProjectTile';
import bulma from 'bulma.scss';
import style from './ProjectList.scss';
const ProjectList = () => {
const tiles = projects.map(project =>
<ProjectTile slide='x' class... | import React from 'react';
import { Helmet } from 'react-helmet';
import projects from 'projects';
import ProjectTile from 'components/ProjectTile';
import bulma from 'bulma.scss';
import style from './ProjectList.scss';
const ProjectList = () => {
const tiles = projects.map(project =>
<ProjectTile slide='x' class... | Add title to project list | Add title to project list
| JSX | mit | VoxelDavid/voxeldavid-website,VoxelDavid/voxeldavid-website,vocksel/my-website,vocksel/my-website | ---
+++
@@ -18,6 +18,8 @@
<div className={bulma.section}>
<div className={bulma.container}>
+ <h1>Projects</h1>
+
{tiles}
</div>
</div> |
7e4d6339752acbb11d99bcc34781c38e35e9a8d6 | pages/cv/lastUpdate.jsx | pages/cv/lastUpdate.jsx | import React, {Fragment} from 'react'
import {format} from 'date-fns'
import {Section, P, Button} from '../../components'
const printHandler = ev => {
ev.preventDefault()
window && window.print()
}
const LastUpdate = ({timestamp}) => {
const DATE_FORMAT = 'LLLL io, YYYY'
const date = format(new Date(timestamp... | import React, {Fragment} from 'react'
import {format} from 'date-fns'
import {Section, P, Button} from '../../components'
const printHandler = ev => {
ev.preventDefault()
window && window.print()
}
const LastUpdate = ({timestamp}) => {
const DATE_FORMAT = 'LLLL do, YYYY'
const date = format(new Date(timestamp... | Fix last update format error. | Fix last update format error.
| JSX | mit | andreiconstantinescu/constantinescu.io | ---
+++
@@ -8,7 +8,7 @@
}
const LastUpdate = ({timestamp}) => {
- const DATE_FORMAT = 'LLLL io, YYYY'
+ const DATE_FORMAT = 'LLLL do, YYYY'
const date = format(new Date(timestamp), DATE_FORMAT)
return ( |
3bfb9a14b5785c14b112a3986aa0a653d3639b93 | src/server/view/home.jsx | src/server/view/home.jsx | import React, { PropTypes } from 'react';
import { renderToString } from 'react-dom/server';
class HelloMessage extends React.PureComponent {
static defaultProps = {
Application: <p>Missing Application :(</p>,
applicationName: '',
preloadedState: JSON.stringify({}),
payload: {},
}
static PropType... | import React, { PropTypes } from 'react';
import { renderToString } from 'react-dom/server';
class HelloMessage extends React.PureComponent {
static defaultProps = {
Application: <p>Missing Application :(</p>,
applicationName: '',
preloadedState: JSON.stringify({}),
payload: {},
}
static PropType... | Add new <meta> tags, title, description, viewport. Add stylesheet and comment the code. | Add new <meta> tags, title, description, viewport. Add stylesheet and comment the code.
| JSX | mit | eddyw/mern-workflow | ---
+++
@@ -20,14 +20,19 @@
return (
<html lang="en">
<head>
+ <meta charSet="utf-8" />
+ <meta httpEquiv="x-ua-compatible" content="ie=edge" />
<title>{payload.title}</title>
+ <meta name="description" content={payload.description} />
+ <meta name="... |
08b0c5cc6a39f4fd28bafc5fd158900b1e584fd5 | client/sections/profile/components/Description.jsx | client/sections/profile/components/Description.jsx | import React, { Component } from 'react';
class Description extends Component {
render() {
const { description, updateDescription } = this.props;
return (
<div className="profile-section">
<div className="profile-title">About Me</div>
<div
contentEditable="true"
cl... | import React, { Component } from 'react';
class Description extends Component {
render() {
const { description, updateDescription } = this.props;
return (
<div className="profile-section">
<div className="profile-title">About Me</div>
<div
contentEditable="true"
cl... | Add character limit to description | Add character limit to description
| JSX | mit | VictoriousResistance/iDioma,VictoriousResistance/iDioma | ---
+++
@@ -14,6 +14,17 @@
ref="description"
onKeyUp={() => {
updateDescription(this.refs.description.innerText);
+ console.log(this.refs.description.innerText);
+ }}
+ onKeyDown={(e) => {
+ if (this.refs.description.innerText.length > 100 && ... |
ee0fd11e0c430e038739cc32379adca7a037c998 | src/utils/ChromeAPI.jsx | src/utils/ChromeAPI.jsx | export function searchHistory(q = "", d = 0, e = false, m = 0) {
let params = {
text: q,
maxResults: m,
startTime: d
};
if (e) {
params["endTime"] = e;
}
return new Promise((resolve, reject) => {
chrome.history.search(params, (h) => {
//console.tab... | export function searchHistory(q = "", d = 0, e = false, m = 0) {
let params = {
text: q,
maxResults: m,
startTime: d
};
if (e) {
params["endTime"] = e;
}
return new Promise((resolve, reject) => {
chrome.history.search(params, (h) => {
//console.tab... | Add Chrome deleteUrl API method | Add Chrome deleteUrl API method
| JSX | mit | MrSaints/historyx,MrSaints/historyx | ---
+++
@@ -23,3 +23,11 @@
});
});
};
+
+export function deleteUrl(u) {
+ return new Promise((resolve, reject) => {
+ chrome.history.deleteUrl({url: u}, () => {
+ resolve();
+ });
+ });
+}; |
dadb6c16a90f355213ed929442104b09d84aacf5 | templates/javascript.jsx | templates/javascript.jsx | import React, { PropTypes } from 'react'
/*
const ThisClass = ( props ) => (
<ThisClass key={ props.foo } />
)
// or:
*/
export default class ThisClass extends React.Component {
constructor(props) {
super(props)
//this.bindInstanceMethods( 'methodName1', 'methodName2' )
//this.state = {}
}
bind... | import React, { PropTypes } from 'react'
/*
const ThisClass = (props) => (
<ThisClass key={props.foo} />
)
// or:
*/
export default class ThisClass extends React.Component {
constructor (props) {
super(props)
this.bindInstanceMethods('methodName1', 'methodName2')
// this.state = {}
}
bindInstan... | Fix syntax issues in JSX template to reconcile Standard | Fix syntax issues in JSX template to reconcile Standard
| JSX | unlicense | chris-kobrzak/js-dev-vim-setup | ---
+++
@@ -1,40 +1,36 @@
import React, { PropTypes } from 'react'
/*
-const ThisClass = ( props ) => (
- <ThisClass key={ props.foo } />
+const ThisClass = (props) => (
+ <ThisClass key={props.foo} />
)
// or:
*/
export default class ThisClass extends React.Component {
- constructor(props) {
+ constr... |
7c1d328cd7b0947874e673b1875302c2c15f732b | src/components/connection-modal/device-tile.jsx | src/components/connection-modal/device-tile.jsx | import {FormattedMessage} from 'react-intl';
import PropTypes from 'prop-types';
import React from 'react';
import bindAll from 'lodash.bindall';
import Box from '../box/box.jsx';
import styles from './connection-modal.css';
class DeviceTile extends React.Component {
constructor (props) {
super(props);
... | import {FormattedMessage} from 'react-intl';
import PropTypes from 'prop-types';
import React from 'react';
import bindAll from 'lodash.bindall';
import Box from '../box/box.jsx';
import styles from './connection-modal.css';
class DeviceTile extends React.Component {
constructor (props) {
super(props);
... | Fix more formatted message descriptions | Fix more formatted message descriptions
| JSX | bsd-3-clause | cwillisf/scratch-gui,LLK/scratch-gui,cwillisf/scratch-gui,cwillisf/scratch-gui,LLK/scratch-gui | ---
+++
@@ -27,8 +27,8 @@
onClick={this.handleConnecting}
>
<FormattedMessage
- defaultMessage="connect"
- description=""
+ defaultMessage="Co... |
c6de6bc5b3b0822b6a052b30397d8187024ec5da | src/app/stores/port-store.jsx | src/app/stores/port-store.jsx | var EventEmitter = require('events').EventEmitter;
var socket = require('../socket');
var DashDispatcher = require('../dispatcher/dash-dispatcher');
var ActionTypes = require('../constants/action-types');
var available = [];
var loading = true;
var opening = false;
var selected = '';
var PortStore = new EventEmitter(... | var EventEmitter = require('events').EventEmitter;
var DashDispatcher = require('../dispatcher/dash-dispatcher');
var ActionTypes = require('../constants/action-types');
var available = [];
var loading = true;
var opening = false;
var selected = '';
var PortStore = new EventEmitter();
PortStore.emitChange = function... | Remove socket module require (now uses server util) | Remove socket module require (now uses server util)
| JSX | mit | ErnWong/pigeon-dash,ErnWong/pigeon-dash | ---
+++
@@ -1,5 +1,4 @@
var EventEmitter = require('events').EventEmitter;
-var socket = require('../socket');
var DashDispatcher = require('../dispatcher/dash-dispatcher');
var ActionTypes = require('../constants/action-types');
|
e388bcd2060c6f667e7a5e3298a9cafa04568906 | client/src/components/HowItWorks.jsx | client/src/components/HowItWorks.jsx | import React from 'react'
import { Link } from 'react-router-dom'
import { bindActionCreators } from 'redux'
import {connect} from 'react-redux'
import * as actionCreators from '../actions/howItWorksActionCreators'
import css from './HowItWorks.scss'
class HowItWorks extends React.Component {
render() {
return (
... | import React from 'react'
import { Link } from 'react-router-dom'
import { bindActionCreators } from 'redux'
import {connect} from 'react-redux'
import * as actionCreators from '../actions/howItWorksActionCreators'
import css from './HowItWorks.scss'
class HowItWorks extends React.Component {
render() {
return (
... | Add onclick to change visibility of howItWorks in state to close button | Add onclick to change visibility of howItWorks in state to close button
| JSX | mit | Code-For-Change/GivingWeb,Code-For-Change/GivingWeb | ---
+++
@@ -12,7 +12,7 @@
return (
<div className="how-it-works">
<div className="button-wrapper">
- <button><i className="fa fa-times" aria-hidden="true"></i></button>
+ <button onClick={this.props.toggleHowItWorks}><i className="fa fa-times" aria-hidden="true"></i></button>
</div>
</div... |
4f5225f72a811610c57e5a477242b8fda3bcd054 | src/app/views/preview/PreviewController.jsx | src/app/views/preview/PreviewController.jsx | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Iframe from '../../components/iframe/Iframe';
const propTypes = {};
export class PreviewController extends Component {
constructor(props) {
super(props);
this.state = {};
}
render () {
return (
... | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import collections from '../../utilities/api-clients/collections';
import notifications from '../../utilities/notifications';
import { updateSelectedPreviewPage, addPreviewCollection, removeSelectedPrev... | Update to fetch colelction data, and handle page changes | Update to fetch colelction data, and handle page changes
Former-commit-id: 5cf9a2d069ed3446efafe3b1db24becddbeed0a3
Former-commit-id: 1c9641d1c8476948cb50b31637733fe7d58dec15
Former-commit-id: d62b4d3883ce160b2efc9615560f4b19f98a1ad5 | JSX | mit | ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence | ---
+++
@@ -1,21 +1,58 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
+import { connect } from 'react-redux';
+
+import collections from '../../utilities/api-clients/collections';
+import notifications from '../../utilities/notifications';
+import { updateSelectedPreviewPage, addPr... |
d1f7804a5a94d46f3db02b4cab802af8d1c4e92e | packages/lesswrong/components/search/SearchAutoComplete.jsx | packages/lesswrong/components/search/SearchAutoComplete.jsx | import React from 'react';
import { registerComponent, Components, getSetting } from 'meteor/vulcan:core'
import { InstantSearch, Configure } from 'react-instantsearch-dom';
import { connectAutoComplete } from 'react-instantsearch/connectors';
import Autosuggest from 'react-autosuggest';
const SearchAutoComplete = con... | import React from 'react';
import { registerComponent, Components, getSetting } from 'meteor/vulcan:core'
import { InstantSearch, Configure } from 'react-instantsearch-dom';
import { connectAutoComplete } from 'react-instantsearch/connectors';
import Autosuggest from 'react-autosuggest';
const SearchAutoComplete = ({ ... | Make connectAutoComplete use registerComponent HoC handling | Make connectAutoComplete use registerComponent HoC handling
| JSX | mit | Discordius/Lesswrong2,Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Lesswrong2 | ---
+++
@@ -4,45 +4,42 @@
import { connectAutoComplete } from 'react-instantsearch/connectors';
import Autosuggest from 'react-autosuggest';
-const SearchAutoComplete = connectAutoComplete(
- ({ hits, currentRefinement, refine, clickAction, placeholder, renderSuggestion, hitsPerPage=7, indexName }) =>
- {
- ... |
028fbe5b927964905586961d9b9d5666227a8fdb | test/index.jsx | test/index.jsx | import React from 'react';
import ReactDOM from 'react-dom';
import { AppContainer } from 'react-hot-loader';
import Test from './Test';
const render = (Component) => {
ReactDOM.render(
<AppContainer>
<Component />
</AppContainer>,
document.getElementById('react-container'),
);
};
render(Test);
... | import React, { StrictMode } from 'react';
import ReactDOM from 'react-dom';
import { AppContainer } from 'react-hot-loader';
import Test from './Test';
const render = (Component) => {
ReactDOM.render(
<StrictMode>
<AppContainer>
<Component />
</AppContainer>
</StrictMode>,
document.g... | Enable StrictMode in test suite | Enable StrictMode in test suite
| JSX | mit | wojtekmaj/react-pdf,wojtekmaj/react-pdf,wojtekmaj/react-pdf | ---
+++
@@ -1,13 +1,15 @@
-import React from 'react';
+import React, { StrictMode } from 'react';
import ReactDOM from 'react-dom';
import { AppContainer } from 'react-hot-loader';
import Test from './Test';
const render = (Component) => {
ReactDOM.render(
- <AppContainer>
- <Component />
- </AppC... |
8d7524a2508b097ac1b5f2880798711c885b89e6 | app/components/App.jsx | app/components/App.jsx | "use strict";
var React = require('react');
var Router = require('react-router');
var DocumentTitle = require('react-document-title');
var RouteHandler = Router.RouteHandler;
var Link = Router.Link;
var data = require('../public/data/places');
var title = "Some places in Italy";
var App = ... | "use strict";
var React = require('react');
var Router = require('react-router');
var DocumentTitle = require('react-document-title');
var RouteHandler = Router.RouteHandler;
var Link = Router.Link;
var data = require('../public/data/places');
var title = "Some places in Italy";
var App = ... | Add "back to index" link | Add "back to index" link
| JSX | mit | elfinxx/isomorphic500,jxnblk/isomorphic500,jeffhandley/oredev-sessions,geekyme/isomorphic-react-template,dmitrif/isomorphic500,w01fgang/isomorphic500,davedx/isomorphic-react-template,ryankanno/isomorphic500,pheadra/isomorphic500,saitodisse/isomorphic500,jmfurlott/isomorphic500,veeracs/isomorphic500,devypt/isomorphic500... | ---
+++
@@ -30,6 +30,7 @@
<h1>{ title }</h1>
<ul className="master">
{ links }
+ <Link to="index"><small>(back to index)</small></Link>
</ul>
<div className="detail">
<RouteHandler /> |
531867b3d6a469b604e2d60946b95bd3d5f6e254 | src/components/user-feed.jsx | src/components/user-feed.jsx | import React from 'react'
import {Link} from 'react-router'
import PaginatedView from './paginated-view'
import Feed from './feed'
export default props => (
<div>
{props.viewUser.blocked ? (
<div className="box-body">
<p>You have blocked <b>{props.viewUser.screenName}</b>, so all of their posts an... | import React from 'react'
import {Link} from 'react-router'
import PaginatedView from './paginated-view'
import Feed from './feed'
export default props => (
<div>
{props.viewUser.blocked ? (
<div className="box-body">
<p>You have blocked <b>{props.viewUser.screenName}</b>, so all of their posts an... | Fix user's own private feed | Fix user's own private feed
Before: user is shown "user has a private feed" for their own feed.
After: user is shown the feed contents.
| JSX | mit | FreeFeed/freefeed-react-client,kadmil/freefeed-react-client,FreeFeed/freefeed-html-react,FreeFeed/freefeed-react-client,davidmz/freefeed-react-client,davidmz/freefeed-react-client,FreeFeed/freefeed-react-client,kadmil/freefeed-react-client,FreeFeed/freefeed-html-react,FreeFeed/freefeed-html-react,kadmil/freefeed-react-... | ---
+++
@@ -11,7 +11,7 @@
<p>You have blocked <b>{props.viewUser.screenName}</b>, so all of their posts and comments are invisible to you.</p>
<p><a onClick={()=>props.userActions.unban({username: props.viewUser.username, id: props.viewUser.id})}>Un-block</a></p>
</div>
- ) : props.viewUse... |
c3febf7b9d2c815d7fe4021fdf27599623652098 | client/apps/hello_world_graphql/components/home.jsx | client/apps/hello_world_graphql/components/home.jsx | import React from 'react';
import PropTypes from 'prop-types';
import gql from 'graphql-tag';
import { useQuery } from '@apollo/react-hooks';
import DeepLink from './deep_link';
import assets from '../libs/assets';
export const GET_WELCOME = gql`
query {
welcomeMessage @client
}
`;
const Home = ({ settings ... | import React from 'react';
import PropTypes from 'prop-types';
import gql from 'graphql-tag';
import { useQuery } from '@apollo/react-hooks';
import { withSettings } from 'atomic-fuel/libs/components/settings';
import DeepLink from './deep_link';
import assets from '../libs/assets';
export const GET_WELCOME = gql`
... | Add settings to Home component | Add settings to Home component
| JSX | mit | atomicjolt/lti_starter_app,atomicjolt/adhesion,atomicjolt/lti_starter_app,atomicjolt/adhesion,atomicjolt/lti_starter_app,atomicjolt/adhesion,atomicjolt/lti_starter_app,atomicjolt/adhesion | ---
+++
@@ -2,6 +2,7 @@
import PropTypes from 'prop-types';
import gql from 'graphql-tag';
import { useQuery } from '@apollo/react-hooks';
+import { withSettings } from 'atomic-fuel/libs/components/settings';
import DeepLink from './deep_link';
@@ -50,4 +51,4 @@
}).isRequired,
};
-export default Home;
+... |
63ca7562ca53e91ee20b87ca3ee44326940dd98a | src/js/monsterlist.jsx | src/js/monsterlist.jsx | var MonsterList = React.createClass({
propTypes: {
allMonsters: React.PropTypes.array.isRequired,
onToggleMonster: React.PropTypes.func.isRequired
},
render: function () {
var self = this;
var theMonsters = this.props.allMonsters.map(function (monster, i){
var icon = monster.selected ? '-' :... | var MonsterList = React.createClass({
propTypes: {
allMonsters: React.PropTypes.array.isRequired,
onToggleMonster: React.PropTypes.func.isRequired
},
render: function () {
var self = this;
var theMonsters = this.props.allMonsters.map(function (monster, i){
var icon = monster.selected ? '-' :... | Refactor UI for look and function | Refactor UI for look and function
| JSX | mit | jkrayer/summoner,jkrayer/summoner | ---
+++
@@ -8,12 +8,12 @@
var theMonsters = this.props.allMonsters.map(function (monster, i){
var icon = monster.selected ? '-' : '+';
return (
- <li key={i}>{monster.name}<button type="button" onClick={self.props.onToggleMonster.bind(null, i)}>{icon}</button></li>
+ <li key={i} onCli... |
6da2ff184e41e14f3b945c038c5f030a74fd200c | app/webpack/taxa/show/components/leaders.jsx | app/webpack/taxa/show/components/leaders.jsx | import React, { PropTypes } from "react";
import { Row, Col } from "react-bootstrap";
import TopObserverContainer from "../containers/top_observer_container";
import TopIdentifierContainer from "../containers/top_identifier_container";
import NumSpeciesContainer from "../containers/num_species_container";
import LastOb... | import React, { PropTypes } from "react";
import { Row, Col } from "react-bootstrap";
import TopObserverContainer from "../containers/top_observer_container";
import TopIdentifierContainer from "../containers/top_identifier_container";
import NumSpeciesContainer from "../containers/num_species_container";
import LastOb... | Remove duplicate total obs from taxon detail. | Remove duplicate total obs from taxon detail.
| JSX | mit | pleary/inaturalist,pleary/inaturalist,inaturalist/inaturalist,pleary/inaturalist,calonso-conabio/inaturalist,pleary/inaturalist,pleary/inaturalist,calonso-conabio/inaturalist,inaturalist/inaturalist,calonso-conabio/inaturalist,inaturalist/inaturalist,inaturalist/inaturalist,calonso-conabio/inaturalist,inaturalist/inatu... | ---
+++
@@ -7,13 +7,9 @@
import NumObservationsContainer from "../containers/num_observations_container";
const Leaders = ( { taxon } ) => {
- let optional = <NumObservationsContainer />;
- if ( taxon.rank_level > 10 ) {
- if ( taxon.complete_species_count ) {
- optional = <NumSpeciesContainer />;
- ... |
01817b117dade2b0f584192e37ad5caf66f177c4 | 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 ... | Fix linting by removing empty line | [styles] Fix linting by removing empty line
| JSX | agpl-3.0 | y-lohse/cozy-files-v3,y-lohse/cozy-drive,enguerran/cozy-drive,cozy/cozy-files-v3,y-lohse/cozy-drive,enguerran/cozy-files-v3,nono/cozy-files-v3,enguerran/cozy-files-v3,enguerran/cozy-drive,cozy/cozy-files-v3,goldoraf/cozy-photos-v3,enguerran/cozy-drive,nono/cozy-files-v3,goldoraf/cozy-drive,y-lohse/cozy-drive,cozy/cozy-... | ---
+++
@@ -16,7 +16,6 @@
import photosApp from './reducers'
import { indexFilesByDate } from './actions/mango'
import AppRoute from './components/AppRoute'
-
const context = window.context
const lang = document.documentElement.getAttribute('lang') || 'en' |
6a169882c6ddb58ac0266c26088c575563a0368c | src/components/App/index.jsx | src/components/App/index.jsx | import React, { Component } from 'react';
import logo from './logo.svg';
import './style.css';
class App extends Component {
render() {
return (
<div className="App">
<div className="App-header">
<img src={logo} className="App-logo" alt="logo" />
... | import React, { Component } from 'react';
import logo from './logo.svg';
import './style.css';
class App extends Component {
render() {
return (
<div className="App">
<div className="App-header">
<img src={logo} className="App-logo" alt="logo" />
... | Add auto deployment functionality for Heroku and Surge | Add auto deployment functionality for Heroku and Surge
| JSX | mit | tokgozmusa/snake-react,tokgozmusa/snake-react,tokgozmusa/snake-react | ---
+++
@@ -14,7 +14,7 @@
Snake will move here soon :)
</p>
<div>
- Travis-CI -> Auto deploy to Heroku and Surge - v14
+ Hello world!
</div>
</div>
); |
6e90066ae27b4425063b3dcb9b8a2efd62fc488f | src/modules/Header/components/Title/Title.jsx | src/modules/Header/components/Title/Title.jsx | import './Title.styles';
import React, { Component, PropTypes } from 'react';
import cx from 'classnames'
import { Tooltip, IconCircle } from '~/components';
import {bindMembersToClass} from '~/utils/react'
const i = window.appSettings.icons
class Title extends Component {
constructor(props) {
super(prop... | import './Title.styles';
import React, { Component, PropTypes } from 'react';
import cx from 'classnames'
import { Tooltip, IconCircle } from '~/components';
import {bindMembersToClass} from '~/utils/react'
const i = window.appSettings.icons
class Title extends Component {
constructor(props) {
super(prop... | Remove side buttons from title | refactor(Header): Remove side buttons from title
| JSX | mit | AdamSalma/Lurka,AdamSalma/Lurka | ---
+++
@@ -33,25 +33,11 @@
<div className={titleClass}
onMouseEnter={this.handleMouseEnter}
onMouseLeave={this.handleMouseLeave}>
- <div className='Title__icon Title__icon--left'>
- <Tooltip content="Board Info" position="left">
- ... |
179722b1efc8bc238ddb0606c1310c2f817919bb | web/component/nag-data-collection.jsx | web/component/nag-data-collection.jsx | // @flow
import React from 'react';
import Nag from 'component/common/nag';
import I18nMessage from 'component/i18nMessage';
import Button from 'component/button';
import useIsMobile from 'effects/use-is-mobile';
type Props = {
onClose: () => void,
};
export default function NagDegradedPerformance(props: Props) {
... | // @flow
import React from 'react';
import Nag from 'component/common/nag';
import I18nMessage from 'component/i18nMessage';
import Button from 'component/button';
import useIsMobile from 'effects/use-is-mobile';
type Props = {
onClose: () => void,
};
export default function NagDegradedPerformance(props: Props) {
... | Update message about third party sharing | Update message about third party sharing | JSX | mit | lbryio/lbry-electron,lbryio/lbry-app,lbryio/lbry-electron,lbryio/lbry-app,lbryio/lbry-electron | ---
+++
@@ -25,7 +25,7 @@
),
}}
>
- lbry.tv collects usage information for itself and third parties (%more_information%).
+ lbry.tv collects usage information for itself only (%more_information%).
</I18nMessage>
}
... |
8490e5854c4b667d7e8be758d293512db2e710a0 | src/components/Session/AddTrustFromDirectory.jsx | src/components/Session/AddTrustFromDirectory.jsx | const React = window.React = require('react');
import AssetCard from '../AssetCard.jsx';
import AddTrustFromDirectoryRow from './AddTrustFromDirectoryRow.jsx';
import directory from '../../directory';
import _ from 'lodash';
export default class AddTrustFromDirectory extends React.Component {
constructor(props) {
... | const React = window.React = require('react');
import AssetCard from '../AssetCard.jsx';
import AddTrustFromDirectoryRow from './AddTrustFromDirectoryRow.jsx';
import directory from '../../directory';
import _ from 'lodash';
export default class AddTrustFromDirectory extends React.Component {
constructor(props) {
... | Implement pulling data from directory in adding trust | Implement pulling data from directory in adding trust
| JSX | apache-2.0 | irisli/stellarterm,irisli/stellarterm,irisli/stellarterm | ---
+++
@@ -9,7 +9,14 @@
super(props);
}
render() {
- let asset = new StellarSdk.Asset('USD', 'GBZ3P4Z53Z7ZHATW6KCA2OXEBWKQGN2433WMSMKF7OJXWFJL4JT6NG4V');
+ let rows = [];
+ _.each(directory.getAllSources(), source => {
+ _.each(source.assets, assetObj => {
+ let asset = new StellarSdk... |
d02fccdd343817cb5dfbdc12de69377c2b07edc0 | src/ModalContainer/index.jsx | src/ModalContainer/index.jsx | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import * as styles from './styles';
export default class ModalContaner extends Component {
static propTypes = {
children: PropTypes.node,
onOverlayClick: PropTypes.func.isRequired,
};
componentDidUpdate(prevProps) {
const... | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import * as styles from './styles';
export default class ModalContainer extends Component {
static propTypes = {
children: PropTypes.node,
onOverlayClick: PropTypes.func.isRequired,
};
componentDidUpdate(prevProps) {
cons... | Rename class to remove spelling mistake. | Rename class to remove spelling mistake.
Should have no impact as it is the default export.
| JSX | mit | andykog/mobx-devtools,mobxjs/mobx-react-devtools,mweststrate/mobservable-react-devtools,andykog/mobx-devtools | ---
+++
@@ -2,7 +2,7 @@
import PropTypes from 'prop-types';
import * as styles from './styles';
-export default class ModalContaner extends Component {
+export default class ModalContainer extends Component {
static propTypes = {
children: PropTypes.node, |
b65c4104b4d8e0d8e60053b459378672c16ff13e | internal_packages/composer-emojis/lib/emoji-picker.jsx | internal_packages/composer-emojis/lib/emoji-picker.jsx | import {React} from 'nylas-exports'
import EmojiActions from './emoji-actions'
const emoji = require('node-emoji');
class EmojiPicker extends React.Component {
static displayName = "EmojiPicker";
static propTypes = {
emojiOptions: React.PropTypes.array,
selectedEmoji: React.PropTypes.string,
};
constr... | import {React} from 'nylas-exports'
import EmojiActions from './emoji-actions'
const emoji = require('node-emoji');
class EmojiPicker extends React.Component {
static displayName = "EmojiPicker";
static propTypes = {
emojiOptions: React.PropTypes.array,
selectedEmoji: React.PropTypes.string,
};
constr... | Fix lint failure from spacing | lint(emoji): Fix lint failure from spacing
| JSX | mit | nylas-mail-lives/nylas-mail,simonft/nylas-mail,nylas-mail-lives/nylas-mail,simonft/nylas-mail,nirmit/nylas-mail,nirmit/nylas-mail,nylas-mail-lives/nylas-mail,nirmit/nylas-mail,nylas-mail-lives/nylas-mail,simonft/nylas-mail,nylas/nylas-mail,nylas/nylas-mail,nylas-mail-lives/nylas-mail,nirmit/nylas-mail,simonft/nylas-mai... | ---
+++
@@ -34,7 +34,7 @@
const emojiChar = emoji.get(emojiOption);
const emojiClass = emojiIndex === i ? "btn btn-icon emoji-option" : "btn btn-icon";
emojis.push(<button key={emojiChar} onMouseDown={() => this.onMouseDown(emojiChar)} className={emojiClass}>{emojiChar} :{emojiOption}:</but... |
7dabfba02ec748e09e18904435f5092d7bb5001a | lib/components/input-email/InputEmail.jsx | lib/components/input-email/InputEmail.jsx | import validate from './validations';
import Input from '../input/Input';
export default class InputEmail extends Input {
static defaultProps = {
validate: validate
};
constructor(props) {
super(props);
}
}
| import React from 'react';
import classnames from 'classnames';
import validate from './validations';
import Input from '../input/Input';
import FieldComponent from '../FieldComponent';
export default class InputEmail extends FieldComponent {
static defaultProps = {
validate: validate
};
getValue() {
... | Make inputemail component as controlled component | Make inputemail component as controlled component
| JSX | mit | drioemgaoin/react-responsive-form,drioemgaoin/react-responsive-form | ---
+++
@@ -1,12 +1,31 @@
+import React from 'react';
+import classnames from 'classnames';
+
import validate from './validations';
import Input from '../input/Input';
-export default class InputEmail extends Input {
+import FieldComponent from '../FieldComponent';
+
+export default class InputEmail extends Field... |
abdcfec66a83eb906e9bd5280c394445f7abf135 | src/sentry/static/sentry/app/utils/deviceNameMapper.jsx | src/sentry/static/sentry/app/utils/deviceNameMapper.jsx | import iOSDeviceList from 'ios-device-list';
export default function(model) {
const modelIdentifier = model.split(' ')[0];
const modelId = model.split(' ').splice(1).join(' ');
const modelName = iOSDeviceList.generationByIdentifier(modelIdentifier);
return modelName === undefined ? model : modelName + ... | import iOSDeviceList from 'ios-device-list';
export default function(model) {
if (!model) {
return null;
}
const modelIdentifier = model.split(' ')[0];
const modelId = model.split(' ').splice(1).join(' ');
const modelName = iOSDeviceList.generationByIdentifier(modelIdentifier);
return modelName === und... | Make the device mapper work with null and undefined | Make the device mapper work with null and undefined
| JSX | bsd-3-clause | JackDanger/sentry,jean/sentry,ifduyue/sentry,beeftornado/sentry,ifduyue/sentry,BuildingLink/sentry,zenefits/sentry,mvaled/sentry,zenefits/sentry,JackDanger/sentry,gencer/sentry,zenefits/sentry,mvaled/sentry,looker/sentry,looker/sentry,JamesMura/sentry,gencer/sentry,JamesMura/sentry,ifduyue/sentry,BuildingLink/sentry,Bu... | ---
+++
@@ -1,8 +1,11 @@
import iOSDeviceList from 'ios-device-list';
export default function(model) {
- const modelIdentifier = model.split(' ')[0];
- const modelId = model.split(' ').splice(1).join(' ');
- const modelName = iOSDeviceList.generationByIdentifier(modelIdentifier);
- return modelName ==... |
d7b162603bf2cd1b5ff390c83a6320bfa238ab64 | frontend/registrar_client/registrar_client.jsx | frontend/registrar_client/registrar_client.jsx | const io = require('socket.io-client'),
config = require('./config.js');
const UnichatRegistrarClient = {
_registrarUrl: null,
_socket: null,
init(registrarUrl) {
this._registrarUrl = registrarUrl;
this._socket = io.connect(this._registrarUrl, {'forceNew': true});
this._socket... | const io = require('socket.io-client'),
config = require('./config.js');
const UnichatRegistrarClient = {
_registrarUrl: null,
_socket: null,
init(registrarUrl) {
this._registrarUrl = registrarUrl;
this._socket = io.connect(this._registrarUrl, {'forceNew': true});
this._socket... | Add initial register client function and listener | Add initial register client function and listener
| JSX | mit | dimkarakostas/unimeet,dimkarakostas/unimeet,dimkarakostas/unimeet,dimkarakostas/unimeet | ---
+++
@@ -14,6 +14,24 @@
this._socket.on('disconnect', () => {
console.log('Registrar disconnected');
});
+ this._socket.on('server-hello', () => {
+ let _form = {
+ email: '2jim@jim.com',
+ sex: 1,
+ password: 'password',... |
0b7c45683f39e72277774f2a77a050a37224c1bf | src/components/Footer.jsx | src/components/Footer.jsx | import React from 'react';
import { Link } from 'react-router';
export default function Footer() {
return (
<div className="block footer">
<div className="wrap">
<div className="footer-nav">
<Link to="/">Home</Link>
<Link to="/portfolio">Portfolio</Link>
<Link to="/con... | import React from 'react';
import { Link } from 'react-router';
import Icon from './Icons';
import iconPaths from '../data/iconPaths';
export default function Footer() {
return (
<div className="block footer">
<div className="wrap">
<div className="footer-nav">
<Link to="/">Home</Link>
... | Add social icons to footer | Add social icons to footer
| JSX | mit | emyarod/afw,emyarod/afw | ---
+++
@@ -1,5 +1,7 @@
import React from 'react';
import { Link } from 'react-router';
+import Icon from './Icons';
+import iconPaths from '../data/iconPaths';
export default function Footer() {
return (
@@ -9,6 +11,17 @@
<Link to="/">Home</Link>
<Link to="/portfolio">Portfolio</Link>
... |
3019f9bd99e0841ff7e5c067d6fbf2a77191831a | app/routes/confirm/containers/SubmissionConfirmPanel.jsx | app/routes/confirm/containers/SubmissionConfirmPanel.jsx | import EditItemPanel from "../../shared/components/EditItemPanel"
import { connect } from "react-redux"
import { num, numSelected } from "../../../modules/submissions/selectors"
const mapStateToProps = (state) => ({
title: `${numSelected(state)}/${num(state)}`,
iconPath: "http://placehold.it/48x48",
subtitle: "S... | import ItemPanel from "../../shared/components/ItemPanel"
import { connect } from "react-redux"
import { num, numSelected } from "../../../modules/submissions/selectors"
const mapStateToProps = (state) => ({
title: `${numSelected(state)}/${num(state)}`,
imagePath: "http://placehold.it/48x48",
subtitle: "Submissi... | Remove edit button from submission confirm panel | Remove edit button from submission confirm panel
| JSX | mit | education/classroom-desktop,education/classroom-desktop,education/classroom-desktop,education/classroom-desktop | ---
+++
@@ -1,11 +1,11 @@
-import EditItemPanel from "../../shared/components/EditItemPanel"
+import ItemPanel from "../../shared/components/ItemPanel"
import { connect } from "react-redux"
import { num, numSelected } from "../../../modules/submissions/selectors"
const mapStateToProps = (state) => ({
title: `... |
d1a1038fad1bee7c34eeb585a5d067f2ca73d320 | client/app/app.jsx | client/app/app.jsx | App = React.createClass({
mixins: [ReactMeteorData],
getMeteorData() {
return {
submissions: Submissions.find({}).fetch(),
};
},
renderSubmissions() {
console.log('test it');
return this.data.submissions.map((submission) => {
return <Submission key={submission._id} submission={subm... | App = React.createClass({
mixins: [ReactMeteorData],
getMeteorData() {
return {
submissions: Submissions.find({}).fetch(),
};
},
renderSubmissions() {
console.log('test it');
return this.data.submissions.map((submission) => {
return <Submission key={submission._id} submission={subm... | Connect input to add new entries | Connect input to add new entries
| JSX | mit | MattReisman/newc,MattReisman/newc | ---
+++
@@ -16,6 +16,16 @@
handleSubmit(event) {
event.preventDefault();
+
+ // Pull text from field
+ var text = React.findDOMNode(this.refs.textInput).value.trim();
+ Submissions.insert({
+ text: text,
+ createdAt: new Date(),
+ });
+
+ // Clear form
+ React.findDOMNode(this.re... |
e3616072a75c09b23ad957b0d6cd1ff7a10abecf | app/assets/javascripts/components/dashboard.js.jsx | app/assets/javascripts/components/dashboard.js.jsx | class Dashboard extends React.Component {
// Receives the props being passed down from the App component.
constructor(props) {
super(props)
this.waterOne = this.props.waterOne
this.state = {
waterEvents: ''
}
}
render() {
console.log('Dashboard Rendered')
let sortedArr = _.sortBy... | class Dashboard extends React.Component {
// Receives the props being passed down from the App component.
constructor(props) {
super(props)
this.waterOne = this.props.waterOne
this.state = {
waterEvents: ''
}
}
render() {
console.log('Dashboard Rendered')
let sortedArr = _.sortBy... | Use example card in dashboard if user has no plants saved | Use example card in dashboard if user has no plants saved
| JSX | mit | Plantia/app,Plantia/app,Plantia/app | ---
+++
@@ -14,28 +14,53 @@
let sortedArr = _.sortBy(this.props.plants, 'updated_at', function(n) {
return n;
})
- return (
+ if (this.props.plants.length < 1){
+ return (
<div className="wrapper">
- {
- sortedArr.map((value, index) => {
- this.pro... |
d1cced842fbfbd32e1bca5229440cc9314de5afc | client/components/TextView.jsx | client/components/TextView.jsx | import React from 'react';
import InputForm from './InputForm.jsx';
import TextAnalytics from './TextAnalytics.jsx';
export default class TextView extends React.Component {
constructor(props) {
super(props);
this.state = {
visibleAnalytics: false,
value: '',
};
}
analyzeText = () => {
... | import React from 'react';
import InputForm from './InputForm.jsx';
import TextAnalytics from './TextAnalytics.jsx';
export default class TextView extends React.Component {
constructor(props) {
super(props);
this.state = {
visibleAnalytics: false,
value: '',
};
}
analyzeText = () => {
... | Fix indentation in render call | Fix indentation in render call
| JSX | mit | nonchalantkettle/SpeechDoctor,alexxisroxxanne/SpeechDoctor,nonchalantkettle/SpeechDoctor,alexxisroxxanne/SpeechDoctor | ---
+++
@@ -26,7 +26,7 @@
}
onChange = (e) => {
- this.setState({
+ this.setState({
value: e.target.value,
});
}
@@ -39,9 +39,9 @@
<h1 id='text-input-title'>Text Analyzer</h1>
<br/>
<InputForm text={this.state.value} onChange={this.onChange}/>
- ... |
8d873d46a0034476e763035d981615c719f32a98 | client/main.jsx | client/main.jsx | import React from 'react';
import ReactDOM from 'react-dom';
import axios from 'axios';
import App from './components/App.jsx';
import Game from './components/Game.jsx';
import About from './components/About.jsx';
import { browserHistory, Router, Route, Redirect } from 'react-router';
require('./../public/main.css');
/... | import React from 'react';
import ReactDOM from 'react-dom';
import axios from 'axios';
import App from './components/App.jsx';
import Game from './components/Game.jsx';
import About from './components/About.jsx';
import { browserHistory, hashHistory, Router, Route, Redirect } from 'react-router';
require('./../public/... | Update router to use hashHistory | Update router to use hashHistory
| JSX | mit | OrderlyPhoenix/OrderlyPhoenix,OrderlyPhoenix/OrderlyPhoenix | ---
+++
@@ -4,13 +4,11 @@
import App from './components/App.jsx';
import Game from './components/Game.jsx';
import About from './components/About.jsx';
-import { browserHistory, Router, Route, Redirect } from 'react-router';
+import { browserHistory, hashHistory, Router, Route, Redirect } from 'react-router';
req... |
fe16fb493dd2c6f077861b4870849ae04c7ef5f9 | web/static/js/components/idea.jsx | web/static/js/components/idea.jsx | import React from "react"
import classNames from "classnames"
import IdeaEditForm from "./idea_edit_form"
import IdeaLiveEditContent from "./idea_live_edit_content"
import IdeaReadOnlyContent from "./idea_read_only_content"
import * as AppPropTypes from "../prop_types"
import styles from "./css_modules/idea.css"
cons... | import React, { Component } from "react"
import classNames from "classnames"
import IdeaEditForm from "./idea_edit_form"
import IdeaLiveEditContent from "./idea_live_edit_content"
import IdeaReadOnlyContent from "./idea_read_only_content"
import * as AppPropTypes from "../prop_types"
import styles from "./css_modules/... | Refactor <Idea> to classical component | Refactor <Idea> to classical component
- will allow it to be rendered inside a flip component
| JSX | mit | samdec11/remote_retro,stride-nyc/remote_retro,stride-nyc/remote_retro,stride-nyc/remote_retro | ---
+++
@@ -1,4 +1,4 @@
-import React from "react"
+import React, { Component } from "react"
import classNames from "classnames"
import IdeaEditForm from "./idea_edit_form"
@@ -7,33 +7,35 @@
import * as AppPropTypes from "../prop_types"
import styles from "./css_modules/idea.css"
-const Idea = props => {
- c... |
5e9798c255a32e40d7b201c5f7f48964916e0dab | src/sentry/static/sentry/app/components/dropdownButton.jsx | src/sentry/static/sentry/app/components/dropdownButton.jsx | import PropTypes from 'prop-types';
import React from 'react';
import styled from 'react-emotion';
import Button from './buttons/button';
import InlineSvg from './inlineSvg';
const DropdownButton = ({isOpen, children}) => {
return (
<StyledButton isOpen={isOpen}>
<StyledChevronDown />
{children}
... | import PropTypes from 'prop-types';
import React from 'react';
import styled from 'react-emotion';
import Button from './buttons/button';
import InlineSvg from './inlineSvg';
const DropdownButton = ({isOpen, children}) => {
return (
<StyledButton isOpen={isOpen}>
<StyledChevronDown />
{children}
... | Fix css syntax error in dropdown button component | fix(ui): Fix css syntax error in dropdown button component
| JSX | bsd-3-clause | beeftornado/sentry,mvaled/sentry,ifduyue/sentry,beeftornado/sentry,ifduyue/sentry,mvaled/sentry,ifduyue/sentry,mvaled/sentry,looker/sentry,looker/sentry,mvaled/sentry,mvaled/sentry,looker/sentry,ifduyue/sentry,looker/sentry,mvaled/sentry,looker/sentry,ifduyue/sentry,beeftornado/sentry | ---
+++
@@ -27,7 +27,7 @@
border-bottom-right-radius: ${p => (p.isOpen ? 0 : p.theme.borderRadius)};
border-bottom-left-radius: ${p => (p.isOpen ? 0 : p.theme.borderRadius)};
position: relative;
- z-index; 1;
+ z-index: 1;
box-shadow: none;
&, &:hover { border-bottom-color: ${p => |
8cfe89b02bdfeedc0203cacdfe8908a93661df5c | views/components/Date.jsx | views/components/Date.jsx | 'use babel';
import React from 'react';
import Moment from 'moment';
export default class Date extends React.Component {
render() {
return <div className="date">
<div className="calendar">
<div className="day">{Moment().date()}</div>
<div className="my">
<div className="month">{M... | 'use babel';
import React from 'react';
import Moment from 'moment';
export default class Date extends React.Component {
constructor() {
super();
this.state = { day: '',
month: '',
year: '',
weekday: ''
};
}
componentWillMount() ... | Move date info to state | Move date info to state
| JSX | mit | jdebarochez/todometer,jdebarochez/todometer,cassidoo/todometer,cassidoo/todometer | ---
+++
@@ -4,16 +4,46 @@
import Moment from 'moment';
export default class Date extends React.Component {
+ constructor() {
+ super();
+ this.state = { day: '',
+ month: '',
+ year: '',
+ weekday: ''
+ };
+ }
+
+ componentWillMount() ... |
de6bc441e500a338ad57ff0d14befd38908ce4e6 | src/components/list.jsx | src/components/list.jsx | import React, { Component, PropTypes } from 'react';
export default class List extends Component {
static propTypes = {
className: PropTypes.string,
Item: PropTypes.func.isRequired,
items: PropTypes.arrayOf(
PropTypes.shape({ id: PropTypes.number.isRequired })
).isRequired,
onSelect: PropT... | import React, { Component, PropTypes } from 'react';
export default class List extends Component {
static propTypes = {
className: PropTypes.string,
Item: PropTypes.func.isRequired,
items: PropTypes.arrayOf(
// TODO: create an interface for Item
PropTypes.shape({ id: PropTypes.number.isRequi... | Add TODO to create an interface for Item | Add TODO to create an interface for Item
| JSX | mit | NiGhTTraX/react-test-buffet,NiGhTTraX/react-test-buffet,NiGhTTraX/react-test-buffet | ---
+++
@@ -6,6 +6,7 @@
className: PropTypes.string,
Item: PropTypes.func.isRequired,
items: PropTypes.arrayOf(
+ // TODO: create an interface for Item
PropTypes.shape({ id: PropTypes.number.isRequired })
).isRequired,
onSelect: PropTypes.func.isRequired |
b51b36d66fe80df3e8c023f823c79efdf296df3c | app/assets/javascripts/mixins/event.js.jsx | app/assets/javascripts/mixins/event.js.jsx | (function() {
var EventMixin = {
timestamp: function(story) {
return moment(story || this.props.story.created).format("ddd, hA")
},
subjectMap: {
Discussion: function(discussion) {
return 'a discussion';
},
Post: function(post) {
return 'a new blog post'
},
... | (function() {
var EventMixin = {
timestamp: function(story) {
return moment(story || this.props.story.created).format("ddd, hA")
},
subjectMap: {
Discussion: function(discussion) {
return 'a discussion';
},
Post: function(post) {
return 'a new blog post'
},
... | Fix typo in event mixin (how was that ever working?) | Fix typo in event mixin (how was that ever working?)
| JSX | agpl-3.0 | lachlanjc/meta,assemblymade/meta,lachlanjc/meta,lachlanjc/meta,assemblymade/meta,lachlanjc/meta,assemblymade/meta,assemblymade/meta | ---
+++
@@ -20,7 +20,7 @@
},
Wip: function(wip) {
if (wip) {
- return "#" + task.number + " " + task.title;
+ return "#" + wip.number + " " + wip.title;
}
}
}, |
86d475c80051c0485c28b6e546d76f1a3ce35678 | src/components/Main.jsx | src/components/Main.jsx | import React from 'react'
import styles from './main.css'
const Main = (props) => (
<div className={styles.main} {...props} />
)
export default Main
| import React from 'react'
import styles from './Main.css'
const Main = (props) => (
<div className={styles.main} {...props} />
)
export default Main
| Refactor react-router and redux logic | Refactor react-router and redux logic
| JSX | mit | Snapflixapp/webpack-react-app,Snapflixapp/webpack-react-app | ---
+++
@@ -1,5 +1,5 @@
import React from 'react'
-import styles from './main.css'
+import styles from './Main.css'
const Main = (props) => (
<div className={styles.main} {...props} /> |
1a9760ce362df207f2113c775b84bdd0cfe571e9 | client/sections/conversations/components/Conversations.jsx | client/sections/conversations/components/Conversations.jsx | import React from 'react';
import Rooms from './Rooms.jsx';
import Messages from './Messages.jsx';
import Input from './Input.jsx';
import Button from './Button.jsx';
import VideoRequestButton from './VideoRequestButton.jsx';
// FIXME add handleOnVideo
// current room will always be the first object in rooms (i.e. roo... | import React from 'react';
import Rooms from './Rooms.jsx';
import Messages from './Messages.jsx';
import Input from './Input.jsx';
import Button from './Button.jsx';
import VideoRequestButton from './VideoRequestButton.jsx';
// FIXME add handleOnVideo
// current room will always be the first object in rooms (i.e. roo... | Add placeholder div for video component | Add placeholder div for video component
| JSX | mit | VictoriousResistance/iDioma,VictoriousResistance/iDioma | ---
+++
@@ -28,6 +28,9 @@
<Button msgTemplate={msgTemplate} inputText={inputText} handleOnSend={handleOnSend} />
<VideoRequestButton handleVideoRequestClick={handleVideoRequestClick} otherId={rooms[0].users[0].id} />
</div>
+ <div id="video">
+ placeholder for video component. id ... |
c2f9d044c52471f1b546f5356d4a964fceb8c0c2 | UIText/index.jsx | UIText/index.jsx | import UIView from '../UIView';
import React from 'react';
class UIText extends UIView {
componentDidMount() {
this.rescale();
}
componentDidUpdate() {
this.rescale();
}
render() {
return (
<span className='ui-text'>{this.props.text}</span>
);
}
... | import UIView from '../UIView';
import React from 'react';
class UIText extends UIView {
componentDidMount() {
this.rescale();
}
componentDidUpdate() {
this.rescale();
}
render() {
return (
<span className='ui-text'>{this.props.text}</span>
);
}
... | Update to UIText for greater precision | Update to UIText for greater precision
| JSX | mit | enigma-io/boundless,enigma-io/boundless,enigma-io/boundless | ---
+++
@@ -18,12 +18,12 @@
rescale() {
let node = React.findDOMNode(this);
- let nodeBox = node.getBoundingClientRect();
- let fontSize = window.getComputedStyle(node).fontSize;
- let parentBox = window.getBoundingClientRect(node.parentNode);
+ let container = node.parentN... |
17647db069209cc8b91f0a6494c7c5a0bd3283de | src/components/form-utils.jsx | src/components/form-utils.jsx | import React from 'react';
// Helpers for use with react-final-form-hooks
export function RadioInput({ field, value, ...additionalProps }) {
const props = { ...field.input, checked: field.input.value === value, value, ...additionalProps };
return <input type="radio" {...props} />;
}
export function CheckboxInput... | import React, { useCallback } from 'react';
import { without } from 'lodash';
// Helpers for use with react-final-form-hooks
export function RadioInput({ field, value, ...additionalProps }) {
const props = { ...field.input, checked: field.input.value === value, value, ...additionalProps };
return <input type="rad... | Add component to handle checkbox that selects subset from values | Add component to handle checkbox that selects subset from values | JSX | mit | FreeFeed/freefeed-react-client,FreeFeed/freefeed-react-client,FreeFeed/freefeed-react-client | ---
+++
@@ -1,4 +1,5 @@
-import React from 'react';
+import React, { useCallback } from 'react';
+import { without } from 'lodash';
// Helpers for use with react-final-form-hooks
@@ -9,6 +10,24 @@
export function CheckboxInput({ field, ...additionalProps }) {
const props = { ...field.input, checked: field.... |
800dc7a6a19fa73b95968afb6d54f73007cafd36 | src/drive/web/modules/drive/Toolbar/components/MoreMenu.spec.jsx | src/drive/web/modules/drive/Toolbar/components/MoreMenu.spec.jsx | import React from 'react'
import { mount } from 'enzyme'
import { act } from 'react-dom/test-utils'
import { ActionMenuItem } from 'cozy-ui/transpiled/react/ActionMenu'
import { setupFolderContent, mockCozyClientRequestQuery } from 'test/setup'
import { downloadFiles } from 'drive/web/modules/actions/utils'
import More... | import React from 'react'
import { render, fireEvent, configure } from '@testing-library/react'
import { setupFolderContent, mockCozyClientRequestQuery } from 'test/setup'
import { downloadFiles } from 'drive/web/modules/actions/utils'
import MoreMenu from './MoreMenu'
import AppLike from 'test/components/AppLike'
jes... | Switch test to react testing lib | test: Switch test to react testing lib
| JSX | agpl-3.0 | nono/cozy-files-v3,nono/cozy-files-v3,nono/cozy-files-v3,nono/cozy-files-v3 | ---
+++
@@ -1,20 +1,17 @@
import React from 'react'
-import { mount } from 'enzyme'
-import { act } from 'react-dom/test-utils'
-import { ActionMenuItem } from 'cozy-ui/transpiled/react/ActionMenu'
+import { render, fireEvent, configure } from '@testing-library/react'
import { setupFolderContent, mockCozyClientRequ... |
28da72f4dc1c2167636053bf734f466dff9bd4b8 | src/components/game/current-game-title.jsx | src/components/game/current-game-title.jsx | // @flow
import {h} from 'preact'
import {connect} from 'preact-redux'
import {translate} from 'react-i18next'
import {GameStage} from '../../game-stage'
import style from '../titles.css'
import type {GameState} from '../../reducer/current-game'
import type {T} from '../../types'
function DisconnectedCurrentGameTitle... | // @flow
import {h} from 'preact'
import {connect} from 'preact-redux'
import {translate} from 'react-i18next'
import {gameTitleSelector} from '../../selectors/game-title'
import style from '../titles.css'
function DisconnectedCurrentGameTitle({title}) {
return <h1 className={style.title}>{title}</h1>
}
function ma... | Use game title selector in current game title component | Use game title selector in current game title component
| JSX | mit | Holi0317/bridge-calc,Holi0317/bridge-calc,Holi0317/bridge-calc | ---
+++
@@ -2,32 +2,16 @@
import {h} from 'preact'
import {connect} from 'preact-redux'
import {translate} from 'react-i18next'
-import {GameStage} from '../../game-stage'
+import {gameTitleSelector} from '../../selectors/game-title'
import style from '../titles.css'
-
-import type {GameState} from '../../reducer... |
3514ee4db7ab037e340d1c30075623547e283523 | app/assets/javascripts/components/timeline/TrainingModules/ModuleRow/ModuleStatus/ExerciseButton.jsx | app/assets/javascripts/components/timeline/TrainingModules/ModuleRow/ModuleStatus/ExerciseButton.jsx | import React from 'react';
import PropTypes from 'prop-types';
export const ExerciseButton = ({
block_id, course, flags, isComplete, isExercise, slug,
complete, fetchExercises, incomplete
}) => {
let button = (
<button className="button small left dark" disabled>
Mark Complete
</button>
);
if ... | import React from 'react';
import PropTypes from 'prop-types';
export const ExerciseButton = ({
block_id, course, flags, isComplete, isExercise, slug,
complete, fetchExercises, incomplete
}) => {
let button = (
<button className="button small left dark" disabled>
Mark Complete
</button>
);
if ... | Make exercise 'Complete' state more explicit | Make exercise 'Complete' state more explicit
| JSX | mit | WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard | ---
+++
@@ -15,9 +15,12 @@
if (flags.marked_complete) {
const onClick = () => incomplete(block_id, slug).then(() => fetchExercises(course.id));
button = (
- <button className="button small left" onClick={onClick}>
- Mark Incomplete
- </button>
+ <div>
+ Status... |
01d06b54d89a3104aa29d07bbeff3e7be59d61ea | src/public/views/header.jsx | src/public/views/header.jsx | 'use strict';
import React from 'react';
import WebHeader from './components/header/webHeader.jsx'
import MobileHeader from './components/header/mobileHeader.jsx'
import SecurityBanner from './components/header/securityBanner.jsx'
import AnnounceBanner from './components/header/announceBanner.jsx'
class Header extend... | 'use strict';
import React from 'react';
import WebHeader from './components/header/webHeader.jsx'
import MobileHeader from './components/header/mobileHeader.jsx'
import SecurityBanner from './components/header/securityBanner.jsx'
import AnnounceBanner from './components/header/announceBanner.jsx'
class Header extend... | Add announcement about release of BU 1.0.2.0 | Add announcement about release of BU 1.0.2.0
| JSX | mit | gandrewstone/BitcoinUnlimitedWeb,BitcoinUnlimited/BitcoinUnlimitedWeb,gandrewstone/BitcoinUnlimitedWeb,BitcoinUnlimited/BitcoinUnlimitedWeb,BitcoinUnlimited/BitcoinUnlimitedWeb | ---
+++
@@ -22,12 +22,12 @@
}
renderAnnounceMessage() {
- return
- //return (
- // <div className='inline-block'>
- // <p> BU x.y.z. has been just released, plese fetch it from the download section</p>
- // </div>
- //)
+ //return
+ ret... |
d431b1cf3c7f39088897ab7176d5c1f5b9facc0b | packages/vulcan-accounts/imports/ui/components/ResetPassword.jsx | packages/vulcan-accounts/imports/ui/components/ResetPassword.jsx | import { Components, registerComponent, withCurrentUser } from 'meteor/vulcan:core';
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { intlShape } from 'meteor/vulcan:i18n';
import { STATES } from '../../helpers.js';
class AccountsResetPassword extends PureComponent {
compone... | import { Components, registerComponent, withCurrentUser } from 'meteor/vulcan:core';
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { intlShape } from 'meteor/vulcan:i18n';
import { STATES } from '../../helpers.js';
class AccountsResetPassword extends PureComponent {
compone... | Remove extra punctuation from reset-password confirmation | Remove extra punctuation from reset-password confirmation
There's already a period. I think an exclamation mark is
over-enthusiastic, but maybe people like resetting their passwords.
| JSX | mit | Discordius/Lesswrong2,Discordius/Telescope,Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Telescope | ---
+++
@@ -20,7 +20,7 @@
} else {
return (
<div className='password-reset-form'>
- <div>{this.context.intl.formatMessage({id: 'accounts.info_password_changed'})}!</div>
+ <div>{this.context.intl.formatMessage({id: 'accounts.info_password_changed'})}</div>
</div>
... |
86a4b27bf20665eb5ed0253b6ef2f9728da7e2e0 | src/components/geolocalizer/geolocalizer.jsx | src/components/geolocalizer/geolocalizer.jsx | import React from 'react';
//import ReactDOM from 'react-dom';
var Geolocalizer = React.createClass ({
render: function () {
return (
<button className="ktg-btn--geolocalizer">
</button>
);
}
});
module.exports = Geolocalizer;
| import React from 'react';
var Geolocalizer = React.createClass ({
getInitialState: function () {
return {
latitude: '0',
longitude: '0'
};
},
geolocalizeMe: function () {
var success = function (position) {
this.setState({latitude: position.coords.latitude});
this.setState({longitude: pos... | Add events and Html5 geolocalization when user click button | Add events and Html5 geolocalization when user click button
| JSX | apache-2.0 | swcraftersclm/katangapp-frontend,swcraftersclm/katangapp-frontend,swcraftersclm/katangapp-frontend | ---
+++
@@ -1,11 +1,30 @@
import React from 'react';
-//import ReactDOM from 'react-dom';
var Geolocalizer = React.createClass ({
+ getInitialState: function () {
+ return {
+ latitude: '0',
+ longitude: '0'
+ };
+ },
+ geolocalizeMe: function () {
+ var success = function (position) {
+ this.setSt... |
24b62bc13ce037fe29c70769d233ee2d83a7eb39 | features/apimgt/org.wso2.carbon.apimgt.store.feature/src/main/resources/devportal/source/src/app/components/Apis/Details/ApiConsole/SwaggerUI.jsx | features/apimgt/org.wso2.carbon.apimgt.store.feature/src/main/resources/devportal/source/src/app/components/Apis/Details/ApiConsole/SwaggerUI.jsx | import React from 'react';
import PropTypes from 'prop-types';
import 'swagger-ui/dist/swagger-ui.css';
import SwaggerUILib from './PatchedSwaggerUIReact';
const disableAuthorizeAndInfoPlugin = function () {
return {
wrapComponents: {
info: () => () => null,
},
};
};
/**
*
* @clas... | import React from 'react';
import PropTypes from 'prop-types';
import 'swagger-ui/dist/swagger-ui.css';
import SwaggerUILib from './PatchedSwaggerUIReact';
const disableAuthorizeAndInfoPlugin = function () {
return {
wrapComponents: {
info: () => () => null,
},
};
};
/**
*
* @clas... | Remove /* from the url. | Remove /* from the url.
| JSX | apache-2.0 | fazlan-nazeem/carbon-apimgt,nuwand/carbon-apimgt,isharac/carbon-apimgt,wso2/carbon-apimgt,tharikaGitHub/carbon-apimgt,sanjeewa-malalgoda/carbon-apimgt,uvindra/carbon-apimgt,chamilaadhi/carbon-apimgt,harsha89/carbon-apimgt,isharac/carbon-apimgt,nuwand/carbon-apimgt,tharikaGitHub/carbon-apimgt,chamilaadhi/carbon-apimgt,u... | ---
+++
@@ -28,7 +28,7 @@
const patternToCheck = api.context + '/*';
req.headers[authorizationHeader] = 'Bearer ' + accessTokenProvider();
if (url.endsWith(patternToCheck)) {
- req.url = url.substring(url.length - 1, 0);
+ req.url = url.substring(0,... |
4807d09fb503f30ca890973e56b421b37e4ce529 | src/reactGUI/initDOM.jsx | src/reactGUI/initDOM.jsx | const ReactDOM = require('./ReactDOM-shim');
const LiterallyCanvasModel = require('../core/LiterallyCanvas');
const LiterallyCanvasReactComponent = require('./LiterallyCanvas');
function init(el, opts) {
const originalClassName = el.className
const lc = new LiterallyCanvasModel(opts)
ReactDOM.render(<LiterallyCa... | const React = require('./React-shim');
const ReactDOM = require('./ReactDOM-shim');
const LiterallyCanvasModel = require('../core/LiterallyCanvas');
const LiterallyCanvasReactComponent = require('./LiterallyCanvas');
function init(el, opts) {
const originalClassName = el.className
const lc = new LiterallyCanvasMod... | Fix a potential problem if user never explicitly imports React | Fix a potential problem if user never explicitly imports React
| JSX | bsd-2-clause | irskep/literallycanvas,literallycanvas/literallycanvas | ---
+++
@@ -1,3 +1,4 @@
+const React = require('./React-shim');
const ReactDOM = require('./ReactDOM-shim');
const LiterallyCanvasModel = require('../core/LiterallyCanvas');
const LiterallyCanvasReactComponent = require('./LiterallyCanvas'); |
79a0ced1fa81d045274a35e174cd428222ff809b | components/react/Form/SelectorV2/Option.jsx | components/react/Form/SelectorV2/Option.jsx | import React from 'react';
import cx from 'classnames';
import styles from './selector_v2.css';
class Option extends React.Component {
onClick(e) {
const { onClick, id, isActive } = this.props;
!isActive && onClick && onClick(id);
e.stopPropagation();
return false;
}
render() {
const { value... | import React from 'react';
import cx from 'classnames';
import styles from './selector_v2.css';
class Option extends React.Component {
onClick(e) {
const { onClick, id, isActive } = this.props;
!isActive && onClick && onClick(id);
e.stopPropagation();
return false;
}
render() {
const { value... | Remove console. Sorry about it | WHAT: Remove console. Sorry about it
WHY:
* XXXXX
HOW:
* NOTHING TO SAY
| JSX | mit | ecmadao/light-ui,ecmadao/light-ui | ---
+++
@@ -17,8 +17,6 @@
isActive && styles['option-active'],
className
);
- console.log('optionClass');
- console.log(optionClass);
return (
<div
onClick={this.onClick.bind(this)} |
e634142fb93450bed1f5706e7c163af714f0f126 | src/javascript/components/BenchmarkModeBadge.jsx | src/javascript/components/BenchmarkModeBadge.jsx | import React, { Component } from 'react';
import Badge from 'react-bootstrap/lib/Badge'
import Tooltip from 'react-bootstrap/lib/Tooltip'
import OverlayTrigger from 'react-bootstrap/lib/OverlayTrigger'
// A badge showing the benchmark mode with a tooltip explaining it
export default class BenchmarkModeBadge extends C... | import React, { Component } from 'react';
import Badge from 'react-bootstrap/lib/Badge'
import Tooltip from 'react-bootstrap/lib/Tooltip'
import OverlayTrigger from 'react-bootstrap/lib/OverlayTrigger'
// A badge showing the benchmark mode with a tooltip explaining it
export default class BenchmarkModeBadge extends C... | Fix warnings on chart pages | Fix warnings on chart pages | JSX | agpl-3.0 | jzillmann/jmh-visualizer,jzillmann/jmh-visualizer | ---
+++
@@ -30,17 +30,20 @@
}
export function createBadge(benchmarkMode) {
+ if (!benchmarkMode) {
+ return null;
+ }
switch (benchmarkMode) {
case 'thrpt':
- return <BenchmarkModeBadge name="Throughput" tooltip="The higher the bars, the better." />
+ return <BenchmarkModeBadg... |
7bd62bdd65d4a5ada800d117094406190fb53754 | imports/ui/containers/HomePageContainer.jsx | imports/ui/containers/HomePageContainer.jsx | import { createContainer } from 'meteor/react-meteor-data';
import HomePage from '../pages/HomePage';
export default HomePageContainer = createContainer(() => {
Meteor.subscribe('homePage.counters');
Meteor.subscribe('homePage.users.last');
return {
usersLast: Meteor.users.find({}, {sort: {createdAt: -1}, li... | import { createContainer } from 'meteor/react-meteor-data';
import HomePage from '../pages/HomePage';
export default HomePageContainer = createContainer(() => {
Meteor.subscribe('homePage.counters');
const usersLastReady = Meteor.subscribe('homePage.users.last').ready();
return {
usersLast: usersLastReady ? ... | Check if subscription ready before pass documents | HomePage: Check if subscription ready before pass documents
When subscription not ready container may pass array of documents
(remaining from another subscription) that don't have all required
properties.
| JSX | agpl-3.0 | Davidyuk/witcoin,Davidyuk/witcoin | ---
+++
@@ -3,9 +3,9 @@
export default HomePageContainer = createContainer(() => {
Meteor.subscribe('homePage.counters');
- Meteor.subscribe('homePage.users.last');
+ const usersLastReady = Meteor.subscribe('homePage.users.last').ready();
return {
- usersLast: Meteor.users.find({}, {sort: {createdAt: -1... |
9d6e2414f018643f992719662858598e7899efc4 | app/components/elements/Userpic.jsx | app/components/elements/Userpic.jsx | import React, {Component, PropTypes} from 'react';
import {connect} from 'react-redux';
class Userpic extends Component {
// account is specified as string, but converted to object in connect
static propTypes = {
account: PropTypes.object
}
render() {
const {account, width, height} = t... | import React, {Component, PropTypes} from 'react';
import {connect} from 'react-redux';
class Userpic extends Component {
// account is specified as string, but converted to object in connect
static propTypes = {
account: PropTypes.object
}
render() {
const {account, width, height} = t... | Add greater pixel density for user comment thumbnails for improved retina/high resolution displays | Add greater pixel density for user comment thumbnails for improved retina/high resolution displays
| JSX | mit | GolosChain/tolstoy,steemit/steemit.com,GolosChain/tolstoy,steemit/steemit.com,TimCliff/steemit.com,GolosChain/tolstoy,steemit/steemit.com,TimCliff/steemit.com,TimCliff/steemit.com | ---
+++
@@ -20,7 +20,7 @@
} catch (e) {}
if (url && /^(https?:)\/\//.test(url)) {
- const size = width && width > 48 ? '320x320' : '72x72'
+ const size = width && width > 48 ? '320x320' : '90x90';
url = $STM_Config.img_proxy_prefix + size + '/' + url;
} ... |
057902c969f4aef836c751c8f9410020dea65218 | app/Resources/client/jsx/project/helpers/removeTraitFromProject.jsx | app/Resources/client/jsx/project/helpers/removeTraitFromProject.jsx | function removeTraitFromProject(traitName, biom, dimension, dbVersion,internalProjectId, action) {
let entries = dimension === 'columns' ? biom.columns : biom.rows
for(let entry of entries){
if(entry.metadata != null){
delete entry.metadata[traitName]
if(entry.metadata.trait_cita... | function removeTraitFromProject(traitName, biom, dimension, dbVersion,internalProjectId, action) {
let entries = dimension === 'columns' ? biom.columns : biom.rows
for(let entry of entries){
if(entry.metadata != null){
delete entry.metadata[traitName]
if(entry.metadata.trait_cita... | Fix delete button for removing traits | Fix delete button for removing traits
| JSX | mit | molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec | ---
+++
@@ -11,7 +11,7 @@
let webserviceUrl = Routing.generate('api_edit_update_project', {'dbversion': dbversion});
$.ajax(webserviceUrl, {
data: {
- "project_id": internalProjectId,
+ "projectId": internalProjectId,
"biom": biom.toString()
},
m... |
21e06ac2f8517fcd598de8204dd88d2e190bc7a8 | app/components/Html/Html.jsx | app/components/Html/Html.jsx | import React, {Component, PropTypes} from 'react';
class Html extends Component {
constructor(props) {
super(props);
}
render() {
return (
<html lang="en">
<head>
<meta charSet="UTF-8" />
<meta name="viewport" content="wid... | import React, {Component, PropTypes} from 'react';
class Html extends Component {
constructor(props) {
super(props);
}
render() {
return (
<html lang="en">
<head>
<meta charSet="UTF-8" />
<meta name="viewport" content="wid... | Fix single quotes getting lost in CSS | Fix single quotes getting lost in CSS
| JSX | mit | davidgilbertson/davidg-site,davidgilbertson/davidg-site | ---
+++
@@ -13,7 +13,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1 user-scalable=no" />
<link href="http://fonts.googleapis.com/css?family=Roboto+Slab:300,400|Roboto:300,400,700,300italic" rel="stylesheet" type="text/css" />
<tit... |
ef1e5b8d19772047c7f67aa6ac660937c25c4d51 | static/js/src/ImageUpload.jsx | static/js/src/ImageUpload.jsx | var React = require('react');
var Chat = require('./Chat.jsx');
var Actions = require('./Actions');
var ImageUpload = require('./ImageUpload.jsx');
var ImageUpload = React.createClass({
handleChange: function(e) {
if (this.props.readyState === 1) {
var that = this;
var reader = new ... | var React = require('react');
var Chat = require('./Chat.jsx');
var Actions = require('./Actions');
var ImageUpload = require('./ImageUpload.jsx');
var ImageUpload = React.createClass({
handleChange: function(e) {
if (this.props.readyState === 1) {
var that = this;
var reader = new ... | Set image file input value to blank\n\n event was only firing once; keep input value clear to allow event to keep firing | Set image file input value to blank\n\n event was only firing once; keep input value clear to allow event to keep firing
| JSX | mit | ebenpack/chatblast,ebenpack/chatblast,ebenpack/chatblast | ---
+++
@@ -28,7 +28,7 @@
inputName += ' disabled';
}
return (
- <label title={this.props.title} className={labelName}><input type="file" disabled={disabled} className={inputName} onChange={this.handleChange} /></label>
+ <label title={this.props.title} className={... |
10459b1379a21e33bdcf46baab19b81f04722181 | client/src/components/Base.jsx | client/src/components/Base.jsx | import React from 'react';
import { NavLink, Link } from 'react-router-dom';
const Base = () => (
<div>
<div className="top-bar">
<div className="top-bar-left">
<NavLink exact to="/">Fridgr</NavLink>
</div>
<div className="top-bar-right">
<Link to="/login">Log in</Link>
... | import React from 'react';
import { NavLink, Link } from 'react-router-dom';
import AppBar from 'material-ui/AppBar';
import Drawer from 'material-ui/Drawer';
import MenuItem from 'material-ui/MenuItem';
import { Router, hashHistory, Route, IndexRoute, withRouter } from 'react-router'; // here in attempt to make the ti... | Change to App Bar implementation | Change to App Bar implementation
| JSX | mit | SentinelsOfMagic/SentinelsOfMagic | ---
+++
@@ -1,9 +1,51 @@
import React from 'react';
import { NavLink, Link } from 'react-router-dom';
+import AppBar from 'material-ui/AppBar';
+import Drawer from 'material-ui/Drawer';
+import MenuItem from 'material-ui/MenuItem';
+import { Router, hashHistory, Route, IndexRoute, withRouter } from 'react-router'; ... |
3918f5322541212ae96b13dfd407ddc9bed18e50 | client/app/main.jsx | client/app/main.jsx | import alt from './libs/alt';
import makeFinalStore from 'alt/utils/makeFinalStore';
import React from 'react';
import App from './views/App';
import VertxActions from './actions/VertxActions.js';
function main() {
const finalStore = makeFinalStore(alt);
finalStore.listen(() => {
console.log("Dispatch cycle c... | import alt from './libs/alt';
import makeFinalStore from 'alt/utils/makeFinalStore';
import React from 'react';
import App from './views/App';
import VertxActions from './actions/VertxActions.js';
function main() {
const finalStore = makeFinalStore(alt);
finalStore.listen(() => {
console.log("Dispatch cycle c... | Send a message from the client | Send a message from the client
| JSX | mit | kaerfredoc/2048MMOG,kaerfredoc/2048MMOG,kaerfredoc/2048MMOG | ---
+++
@@ -18,4 +18,9 @@
}
main();
-VertxActions.doVertxConnect();
+
+const Vertx = require('vertx3-eventbus-client');
+var eb = new Vertx("http://localhost:8080/eventbus");
+eb.onopen = function () {
+ eb.send("org.mmog2048", {"msg":"From the client"});
+}; |
bdc13a0ed68af8bf2c6a689982e7364c62ce3634 | voting-client/test/components/Voting_spec.jsx | voting-client/test/components/Voting_spec.jsx | import Voting from '../../src/components/Voting';
import ReactDOM from 'react-dom';
import {
renderIntoDocument,
scryRenderedDOMComponentsWithTag,
Simulate
} from 'react-addons-test-utils';
import Voting from '../../src/components/Voting';
import {expect} from 'chai';
desribe('Voting', () => {
it('renders a p... | import Voting from '../../src/components/Voting';
import ReactDOM from 'react-dom';
import {
renderIntoDocument,
scryRenderedDOMComponentsWithTag,
Simulate
} from 'react-addons-test-utils';
import Voting from '../../src/components/Voting';
import {expect} from 'chai';
desribe('Voting', () => {
it('renders a p... | Add unit test for disabled button state | Add unit test for disabled button state
| JSX | mit | danshapiro-optimizely/full_stack_redux | ---
+++
@@ -36,4 +36,15 @@
expect(votedWith).to.equal('Trainspotting');
});
+ it('disables butons when user has voted', () => {
+ const component = renderIntoDocument(
+ <Voting pair={['Trainspotting', '28 Days Later']} hasVoted='Trainspotting' />
+ );
+ const buttons = scryRenderedDOMCompone... |
f7a20d2b32aa65d278f9f501cf89b95094757a96 | examples/source/components/InnerMenuBlockGather.jsx | examples/source/components/InnerMenuBlockGather.jsx | import React, { Component } from "react";
import { contextMenu } from "downright";
import PaddedBox from "../layout/PaddedBox";
import Heading from "../styles/Heading";
@contextMenu(
() => [<Heading>Inner menu 3</Heading>, "Fully blocks outer menu"],
{
stopGathering: true
}
)
export default class I... | import React, { Component } from "react";
import { contextMenu } from "downright";
import PaddedBox from "../layout/PaddedBox";
import Heading from "../styles/Heading";
@contextMenu(
() => [<Heading>Inner menu 3</Heading>, "Fully blocks outer menu"],
{
stopGathering: true
}
)
export default class I... | Fix text on nested example | Fix text on nested example
| JSX | mit | downplay/downright | ---
+++
@@ -10,5 +10,5 @@
}
)
export default class InnerMenuBlockGather extends Component {
- render = () => <PaddedBox blue>Nested, appending</PaddedBox>;
+ render = () => <PaddedBox blue>Nested, blocking</PaddedBox>;
} |
91fdece57656a4abd0d4c0b4abd155bf6dcf3421 | js/components/AppVersionListComponent.jsx | js/components/AppVersionListComponent.jsx | /** @jsx React.DOM */
define([
"React",
"jsx!components/AppVersionListItemComponent",
], function(React, AppVersionListItemComponent) {
return React.createClass({
displayName: "AppVersionListComponent",
propTypes: {
app: React.PropTypes.object.isRequired,
appVersions: React.PropTypes.array,
... | /** @jsx React.DOM */
define([
"React",
"jsx!components/AppVersionListItemComponent",
], function(React, AppVersionListItemComponent) {
return React.createClass({
displayName: "AppVersionListComponent",
propTypes: {
app: React.PropTypes.object.isRequired,
appVersions: React.PropTypes.array,
... | Use `map` to render app versions | Use `map` to render app versions | JSX | apache-2.0 | pierlo-upitup/marathon-ui,Raffo/marathon-ui,Raffo/marathon-ui,pierlo-upitup/marathon-ui,janisz/marathon-ui,mesosphere/marathon-ui,mesosphere/marathon-ui,Kosta-Github/marathon-ui,cribalik/marathon-ui,cribalik/marathon-ui,Kosta-Github/marathon-ui,yp-engineering/marathon-ui,yp-engineering/marathon-ui,quamilek/marathon-ui,... | ---
+++
@@ -27,8 +27,7 @@
);
} else {
if (this.props.appVersions.length > 0) {
- listItems = [];
- this.props.appVersions.forEach(function(v) {
+ listItems = this.props.appVersions.map(function(v) {
return (
<AppVersionListItemComponent
... |
41af2bcd135cce5de57cb489ef8f00d4acec8da8 | src/ui/pane/quick_auth_pane.jsx | src/ui/pane/quick_auth_pane.jsx | import React from 'react';
import AuthButton from '../button/auth_button';
const QuickAuthPane = (props) => {
const {
alternativeLabel,
alternativeClickHandler,
buttonLabel,
buttonClickHandler,
header,
strategy
} = props;
return (
<div className="auth0-lock-last-login-pane">
{h... | import React from 'react';
import AuthButton from '../button/auth_button';
const QuickAuthPane = (props) => {
const {
alternativeLabel,
alternativeClickHandler,
buttonLabel,
buttonClickHandler,
header,
strategy
} = props;
const alternative = alternativeLabel
? <p className="auth0-loc... | Make alternative link optional in QuickAuthPane | Make alternative link optional in QuickAuthPane
| JSX | mit | mike-casas/lock,mike-casas/lock,mike-casas/lock | ---
+++
@@ -11,6 +11,19 @@
strategy
} = props;
+ const alternative = alternativeLabel
+ ? <p className="auth0-lock-alternative">
+ <a
+ className="auth0-lock-alternative-link"
+ href="#"
+ onClick={e => {e.preventDefault(); alternativeClickHandler(e)}}
+ >
+ ... |
9ba9a6b87ea3f983a8fc765ae9ff3e0c16ca3947 | tutor/src/components/scores/average-info.jsx | tutor/src/components/scores/average-info.jsx | import React from 'react';
import { Popover, OverlayTrigger } from 'react-bootstrap';
import Icon from '../icon';
const TUTOR_AVERAGE_INFO = `\
Class averages are not displayed or included in the overall average until
after the assignment due date.
At that time, scores from all assignments, both complete and incompl... | import React from 'react';
import { Popover, OverlayTrigger } from 'react-bootstrap';
import Icon from '../icon';
const TUTOR_AVERAGE_INFO = `\
Class performance reflects class-wide averages of assignment scores and assignment progress. This metric includes scores and work
completed by the due date.\
`;
const CC_AVE... | Update Class Performance (i) copy | Update Class Performance (i) copy
Per mockup: http://4tk3oi.axshare.com/tutor_scores_paired_new_tabs_toolbar_dashboard_sty_2.html#choose_settings_tab=lms&CSUM=1 | JSX | agpl-3.0 | openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js | ---
+++
@@ -3,9 +3,8 @@
import Icon from '../icon';
const TUTOR_AVERAGE_INFO = `\
-Class averages are not displayed or included in the overall average until
- after the assignment due date.
- At that time, scores from all assignments, both complete and incomplete, are included.\
+Class performance reflects class-... |
0b60a7bf993d3247aa763ab6e9d979f51c802104 | web-server/app/assets/javascripts/components/updates/show-update-component.jsx | web-server/app/assets/javascripts/components/updates/show-update-component.jsx | define(function(require) {
var _ = require('underscore'),
React = require('react'),
Status = require('../../stores/status'),
StatusComponent = require('../../components/updates/status-component'),
showModel = require('../../mixins/show-model');
var ShowUpdateComponent = React.createClass({
... | define(function(require) {
var _ = require('underscore'),
React = require('react'),
Status = require('../../stores/status'),
StatusComponent = require('../../components/updates/status-component'),
showModel = require('../../mixins/show-model');
var ShowUpdateComponent = React.createClass({
... | Fix show update campaign to use UUID | Fix show update campaign to use UUID
| JSX | mpl-2.0 | PDXostc/rvi_sota_server,PDXostc/rvi_sota_server,PDXostc/rvi_sota_server | ---
+++
@@ -12,7 +12,7 @@
mixins: [showModel],
whereClause: function() {
var params = this.context.router.getCurrentParams();
- return {id: parseInt(params.id)};
+ return {id: params.id};
},
showView: function() {
var rows = _.map(this.state.Model.attributes, function(value... |
438eb55b1a59c8d359d6f1520c77a8e64a0bcfa7 | docs/src/app/components/pages/components/avatar.jsx | docs/src/app/components/pages/components/avatar.jsx | var React = require('react');
var mui = require('mui');
var Avatar = mui.Avatar;
var Icon = mui.Icon;
var ComponentDoc = require('../../component-doc.jsx');
var AvatarPage = React.createClass({
render: function() {
var avatarCode = '<Avatar className="my-custom-avatar">KS</Avatar>\n\n' +
'<A... | var React = require('react');
var mui = require('mui');
var Avatar = mui.Avatar;
var Icon = mui.Icon;
var ComponentDoc = require('../../component-doc.jsx');
var AvatarPage = React.createClass({
render: function() {
var avatarCode = '<Avatar className="my-custom-avatar">KS</Avatar>\n\n' +
'<A... | Fix wrong className on Avatar documentation | Fix wrong className on Avatar documentation
| JSX | mit | pschlette/material-ui-with-sass,sarink/material-ui-with-sass,pschlette/material-ui-with-sass,sarink/material-ui-with-sass | ---
+++
@@ -7,7 +7,7 @@
var AvatarPage = React.createClass({
render: function() {
var avatarCode = '<Avatar className="my-custom-avatar">KS</Avatar>\n\n' +
- '<Avatar className="my-custom-avatar"><Icon>face</Icon></Avatar>\n\n' +
+ '<Avatar><Icon>face</Icon></Avatar>\n... |
1eb7ff2925ef77ecacfc362da16c992439179fca | BlazarUI/app/scripts/components/branch-state/CommitInfo.jsx | BlazarUI/app/scripts/components/branch-state/CommitInfo.jsx | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import Icon from '../shared/Icon.jsx';
import CommitLink from './CommitLink.jsx';
import CompareCommitsLink from './CompareCommitsLink.jsx';
const CommitInfo = ({commitInfo}) => {
const previousCommit = <CommitLink commit={commitI... | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import Icon from '../shared/Icon.jsx';
import CommitLink from './CommitLink.jsx';
import CompareCommitsLink from './CompareCommitsLink.jsx';
const CommitInfo = ({commitInfo}) => {
if (!commitInfo.get('previous')) {
return <Com... | Handle commit info for first build in branch when there is no previous build | Handle commit info for first build in branch when there is no previous build
| JSX | apache-2.0 | HubSpot/Blazar,HubSpot/Blazar,HubSpot/Blazar,HubSpot/Blazar | ---
+++
@@ -5,6 +5,10 @@
import CompareCommitsLink from './CompareCommitsLink.jsx';
const CommitInfo = ({commitInfo}) => {
+ if (!commitInfo.get('previous')) {
+ return <CommitLink commit={commitInfo.get('current')} />;
+ }
+
const previousCommit = <CommitLink commit={commitInfo.get('previous')} />;
co... |
1e5e25b7f5c25bc68670fcff52b777eee53e0dc5 | src/app/global/NavBar.jsx | src/app/global/NavBar.jsx | import React, { Component } from 'react';
import { Link } from 'react-router'
export default class NavBar extends Component {
constructor(props) {
super(props);
this.state = {
authenticated: true
}
}
render() {
return (
<ul className="nav__list">
... | import React, { Component } from 'react';
import { Link } from 'react-router'
import { connect } from 'react-redux'
class NavBar extends Component {
constructor(props) {
super(props);
}
render() {
return (
<ul className="nav__list">
{ this.renderNavItems() }
... | Use mapStateToProps to allow checking if user is authenticated | Use mapStateToProps to allow checking if user is authenticated
| JSX | mit | ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence | ---
+++
@@ -1,14 +1,12 @@
import React, { Component } from 'react';
import { Link } from 'react-router'
+import { connect } from 'react-redux'
-export default class NavBar extends Component {
+class NavBar extends Component {
constructor(props) {
super(props);
- this.state = {
- ... |
f410329df36e881983fc324093f170ac135b5b10 | application/client/bootstrap.jsx | application/client/bootstrap.jsx | /* global navigator */
/**
* Handle client side file loading and take
* care for performance due to async loading.
*
* @file
* @module
*
* @author hello@ulrichmerkel.com (Ulrich Merkel), 2016
* @version 0.0.2
*
* @requires client/loader/offline
* @requires client/loader/async
* @requires common/config/appli... | /* global navigator */
/**
* Handle client side file loading and take
* care for performance due to async loading.
*
* @file
* @module
*
* @author hello@ulrichmerkel.com (Ulrich Merkel), 2016
* @version 0.0.2
*
* @requires client/loader/offline
* @requires client/loader/async
* @requires common/config/appli... | Adjust service worker file path | Adjust service worker file path
| JSX | mit | ulrich-merkel/www.ulrichmerkel.com,ulrich-merkel/www.ulrichmerkel.com,ulrich-merkel/www.ulrichmerkel.com | ---
+++
@@ -25,7 +25,7 @@
// Register the service worker if available
if (configApplication.serviceWorker.use && navigator.serviceWorker) {
- navigator.serviceWorker.register('./service-worker.bundle.js')
+ navigator.serviceWorker.register('/service-worker.bundle.js')
.then(function (reg) {
... |
34827509e30b93fe0147794e645dbffb6730b5c4 | src/shell/components/shell-view.jsx | src/shell/components/shell-view.jsx | 'use strict';
require('./shell-view.scss');
var React = require('react');
var glimpse = require('glimpse');
var EmitterMixin = require('lib/components/emitter-mixin');
module.exports = React.createClass({
mixins: [ EmitterMixin ],
componentDidMount: function () {
this.addListener('shell.application.a... | 'use strict';
require('./shell-view.scss');
var React = require('react');
var glimpse = require('glimpse');
var EmitterMixin = require('lib/components/emitter-mixin');
module.exports = React.createClass({
mixins: [ EmitterMixin ],
componentDidMount: function () {
this.addListener('shell.application.a... | Remove last warning from 0.12.x update | Remove last warning from 0.12.x update
| JSX | unknown | Glimpse/Glimpse.Client.Prototype,avanderhoorn/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,avanderhoorn/Glimpse.Client.Prototype | ---
+++
@@ -15,7 +15,7 @@
return (
<div className="application-holder">
{this.props.applications.map(function (application) {
- return <div key={application.key}>{application.component()}</div>;
+ return <div key={application.key}><applicati... |
3ccbccff6ac4c2801fa8dbb639e0f73be8e3266f | app/components/pages/SubmitPost.jsx | app/components/pages/SubmitPost.jsx | import React from 'react';
// import {connect} from 'react-redux';
import { browserHistory } from 'react-router';
import ReplyEditor from 'app/components/elements/ReplyEditor'
const formId = 'submitStory'
const SubmitReplyEditor = ReplyEditor(formId)
class SubmitPost extends React.Component {
// static propTypes ... | import React from 'react';
// import {connect} from 'react-redux';
import { browserHistory } from 'react-router';
import ReplyEditor from 'app/components/elements/ReplyEditor'
const formId = 'submitStory'
const SubmitReplyEditor = ReplyEditor(formId)
class SubmitPost extends React.Component {
// static propTypes ... | Disable ReplyEditor form cleaning after submit | Disable ReplyEditor form cleaning after submit
| JSX | mit | GolosChain/tolstoy,GolosChain/tolstoy,GolosChain/tolstoy | ---
+++
@@ -14,7 +14,7 @@
super()
this.success = (/*operation*/) => {
// const { category } = operation
- localStorage.removeItem('replyEditorData-' + formId)
+ // localStorage.removeItem('replyEditorData-' + formId)
browserHistory.push('/created')//'/... |
e1e043238eb62afcfc84a1b584c3fba8710905a4 | components/Signup.jsx | components/Signup.jsx | import React, { PropTypes } from 'react';
import { Link } from 'react-router';
const propTypes = {
children: PropTypes.element,
};
function SignUp() {
return (
<div>
<h1>Get Your Own Lost-Item.Com Link</h1>
<p>
So if you lose your stuff, someone can get it back to you.
</p>
</div... | import React, { PropTypes } from 'react';
import { Link } from 'react-router';
const propTypes = {
children: PropTypes.element,
};
class SignUpForm extends React.Component {
render() {
return (
<form>
<div>
<label>What is your name?</label>
<input type="text" name="name" />
... | Add a (not yet working) signup form | Add a (not yet working) signup form
| JSX | mit | ezl/lost-item,ezl/lost-item | ---
+++
@@ -4,6 +4,34 @@
const propTypes = {
children: PropTypes.element,
};
+
+class SignUpForm extends React.Component {
+ render() {
+ return (
+ <form>
+ <div>
+ <label>What is your name?</label>
+ <input type="text" name="name" />
+ <p>If someone you know finds som... |
45df090ae7806165129aba204b22e23ac5b30fd9 | app/app/utils/auth.jsx | app/app/utils/auth.jsx | import axios from 'axios'
let auth = {
login(user, callback){
if (this.loggedIn()){
callback(true);
return;
}
axios.post('/sessions', user).then((res) => {
if (res.data.authenticated) {
localStorage.token = res.data.token
localStorage.id = res.data.user.id
if (callback) callback(true);
}... | import axios from 'axios'
let auth = {
login(user, callback){
if (this.loggedIn()){
callback(true);
return;
}
axios.post('/sessions', user).then((res) => {
if (res.data.authenticated) {
localStorage.token = res.data.token
localStorage.id = res.data.user.id
if (callback) callback(true);
}... | Refactor logout helper to just clear localstorage | Refactor logout helper to just clear localstorage
| JSX | mit | taodav/MicroSerfs,taodav/MicroSerfs | ---
+++
@@ -27,15 +27,9 @@
return !!localStorage.token
},
- logout(callback){
- axios.delete('/sessions').then((res) => {
- if (res.data.err) {
- callback(false)
- } else {
- localStorage.clear()
- callback(true)
- }
- })
+ logout(){
+ console.log('Logged Out')
+ localStorage.clear()
},
... |
3035766927dd6da73a43f48ca4cc2277ba2e0d53 | dashboard/client/packages/bulma-dashboard-theme-worona/src/elements/Input/index.jsx | dashboard/client/packages/bulma-dashboard-theme-worona/src/elements/Input/index.jsx | import React from 'react';
import cx from 'classnames';
import styles from './style.css';
const Input = ({ input, touched, error, size, label }) =>
<div className={styles.input}>
{label && <label className="label">{label}</label>}
<p className={cx('control', input.icon && 'has-icon')}>
<input className... | import React from 'react';
import cx from 'classnames';
import styles from './style.css';
const Input = ({ input, meta: { touched, error }, size, label, icon, placeholder, type }) =>
<div className={styles.input}>
{label && <label className="label">{label}</label>}
<p className={cx('control', icon && 'has-ic... | Fix problem with new object shape of redux-form 6 rc4 | Fix problem with new object shape of redux-form 6 rc4
| JSX | mit | worona/worona,worona/worona-dashboard,worona/worona-dashboard,worona/worona-core,worona/worona,worona/worona-core,worona/worona | ---
+++
@@ -2,14 +2,14 @@
import cx from 'classnames';
import styles from './style.css';
-const Input = ({ input, touched, error, size, label }) =>
+const Input = ({ input, meta: { touched, error }, size, label, icon, placeholder, type }) =>
<div className={styles.input}>
{label && <label className="label... |
6855a3a4d7b6a2f482a2c4805f5c362697768b64 | SingularityUI/app/components/taskDetail/TaskHistory.jsx | SingularityUI/app/components/taskDetail/TaskHistory.jsx | import React, { PropTypes } from 'react';
import Utils from '../../utils';
import Section from '../common/Section';
import SimpleTable from '../common/SimpleTable';
import classNames from 'classnames';
function TaskHistory (props) {
return (
<Section title="History">
<SimpleTable
emptyMessage="This... | import React, { PropTypes } from 'react';
import Utils from '../../utils';
import Section from '../common/Section';
import SimpleTable from '../common/SimpleTable';
import classNames from 'classnames';
function TaskHistory (props) {
return (
<Section title="History">
<SimpleTable
emptyMessage="This... | Fix one last lint error | Fix one last lint error
| JSX | apache-2.0 | andrhamm/Singularity,hs-jenkins-bot/Singularity,HubSpot/Singularity,HubSpot/Singularity,hs-jenkins-bot/Singularity,HubSpot/Singularity,andrhamm/Singularity,hs-jenkins-bot/Singularity,HubSpot/Singularity,andrhamm/Singularity,andrhamm/Singularity,hs-jenkins-bot/Singularity,andrhamm/Singularity,HubSpot/Singularity,hs-jenk... | ---
+++
@@ -14,7 +14,7 @@
headers={['Status', 'Message', 'Time']}
renderTableRow={(data, index) => {
return (
- <tr key={index} className={classNames({'medium-weight' :index === 0})}>
+ <tr key={index} className={classNames({'medium-weight': index === 0})}>
... |
6da16806d1dacdf1306a233f1b4997033eb6dc71 | src/views/Layout.jsx | src/views/Layout.jsx | import React from "react";
export default function Layout(props) {
return (
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>URI:teller</title>
{props.styles.map((href, index) => <link key={index} rel="s... | import React from "react";
export default function Layout(props) {
return (
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>URI:teller</title>
{props.styles.map((href, index) => <link key={index} rel="s... | Add a link to the main page | Add a link to the main page
| JSX | mit | HowNetWorks/uriteller | ---
+++
@@ -14,9 +14,7 @@
<nav className="navbar navbar-default navbar-fixed-top">
<div className="container">
<div className="navbar-header">
- <a className="navbar-brand" href="#">
- URI:teller
- ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.