This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { LOAD_ADDRESSES } from './constants'; | |
import { addressesLoaded, addressesLoadingError } from './reducer' | |
import { takeLatest, put, call, select } from 'redux-saga/effects' | |
import { delay } from 'redux-saga' | |
import { selectAgencyId } from '../App/selectors' | |
import request from '../../utils/request' | |
export function* loadAddresses(action) { | |
try { | |
yield delay(250); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component, PropTypes } from 'react'; | |
import { connect } from 'react-redux'; | |
import { createStructuredSelector } from 'reselect'; | |
import { selectAgencyType } from '../App/selectors'; | |
import { Route, Redirect } from 'react-router-dom'; | |
import { loadCategory } from './reducer'; | |
import { CategoryList } from '../../components/CategoryList'; | |
/** | |
* routes: 3 scenarios for now: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { LOAD_AGENCY } from './constants'; | |
import { agencyLoaded, agencyLoadingError } from './reducer'; | |
import { takeLatest, put, call } from 'redux-saga/effects' | |
import request from '../../utils/request' | |
function* loadAgency(action) { | |
const requestUrl = `agencies/subdomain/${action.subdomain}`; | |
try { | |
const agency = yield call(request, requestUrl); | |
yield put(agencyLoaded(agency)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import { Provider } from 'react-redux'; | |
import App from './App'; | |
import './index.css'; | |
import configureStore from './store'; | |
const store = configureStore({ test: "ok" }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component, PropTypes } from 'react'; | |
import { connect } from 'react-redux'; | |
import { setData } from 'redux/modules/importData'; | |
import Helmet from 'react-helmet'; | |
import Button from 'react-bootstrap/lib/Button'; | |
function processData(csv, cb) { | |
const allTextLines = csv.split(/\r\n|\n/); | |
const lines = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
knex('users').innerJoin('accounts', function() { | |
this.on('accounts.id', '=', 'users.account_id').andOn('accounts.status', '=', 'active') | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component, PropTypes } from 'react'; | |
const styles = require('./App.scss'); | |
@connect( | |
state => ({ | |
user: state.auth.user, | |
agency: state.agency | |
}), | |
{ logout, changeLocale, pushState: push }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* | |
* LanguageProvider | |
* | |
* this component connects the redux state language locale to the | |
* IntlProvider component and i18n messages (loaded from `app/translations`) | |
*/ | |
import React from 'react'; | |
import { connect } from 'react-redux'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export App from './App/App'; | |
export BlockIssues from './BlockIssues/BlockIssues'; | |
export IssueHistoryItem from './IssueHistoryItem'; | |
export TrackIssue from './TrackIssue'; | |
export IssueSearch from './IssueSearch/IssueSearch'; | |
export LanguageProvider from './LanguageProvider'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import logo from './logo.svg'; | |
import Router from 'react-router/BrowserRouter'; | |
import Match from 'react-router/Match' | |
import Miss from 'react-router/Miss' | |
import Link from 'react-router/Link' | |
import './App.css'; | |
const Home = () => ( | |
<div className="App"> |