This file contains hidden or 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
    
  
  
    
  | /* eslint-disable react/require-default-props */ | |
| /* eslint-disable react/forbid-prop-types */ | |
| /* eslint-disable react/sort-comp */ | |
| import { PureComponent } from 'react'; | |
| import PropTypes from 'prop-types'; | |
| import MapboxGeocoder from '@mapbox/mapbox-gl-geocoder'; | |
| class Geocoder extends PureComponent { | |
| geocoder = null; | |
| geocoderNode = null; | 
  
    
      This file contains hidden or 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
    
  
  
    
  | const sendPin = (action$, state$) => | |
| action$.pipe( | |
| ofType(constants.SEND_PIN_REQUEST), | |
| map(() => state$.value.Signup.mdn), | |
| switchMap(mdn => | |
| from(service.sendPin({ lang: 'en-US', msisdn: mdn, type: 'SMS_PIN' })).pipe( | |
| map(() => creators.sendPinSuccess()), | |
| catchError((error) => | |
| // of$ a from$ vracaju obe observable. preto mergeMap(flatMap) ju unwrapne a vrati do streamu len value. | |
| mergeMap(error => { | 
  
    
      This file contains hidden or 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 const navigationLogic = createLogic({ | |
| type: UPDATE_SUCCESS, | |
| validate: (allow) => { | |
| currentPath: '' | |
| if(path === "something") { | |
| allow() | |
| } | |
| } | |
| async process({ getState, action, api }, dispatch, done) { | 
  
    
      This file contains hidden or 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 isEmpty from 'lodash/isEmpty' | |
| import { Effect } from 'formik-effect' | |
| export default ({ appStore }) => ( | |
| <Effect | |
| onChange={(current, next) => { | |
| if (isEmpty(current.touched) && !isEmpty(next.touched)) { | |
| appStore.setDirty(true) | |
| } | 
  
    
      This file contains hidden or 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
    
  
  
    
  | <Steps> | |
| <Steps.Item>1. Stage One</Steps.Item> | |
| <Steps.Item>2. Stage Two</Steps.Item> | |
| <Steps.Item>3. Stage Three</Steps.Item> | |
| </Steps> | |
| <IndexSwitch> | |
| <StepContent> | |
| {({ nextStep }) => ( | |
| <Fragment> | |
| <p>You see Mike</p> | 
  
    
      This file contains hidden or 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 { | |
| createReducer, | |
| createAction, | |
| createAsyncAction | |
| } from "../utils/redux-utils"; | |
| import * as api from "../api/feeds"; | |
| const ids = []; | |
| const byId = {}; | 
  
    
      This file contains hidden or 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 produce from "immer"; | |
| /** | |
| * @param {Object} actionMap - Map of Actions, e.g. { [ACTION_TYPE]: (draft, payload) => {}}. | |
| * draft is current copy state return from immers producer | |
| * @param {Object} defaultState - default state used at redux/@@INIT | |
| * @returns a reducer | |
| */ | |
| export function createReducer(actionMap, defaultState) { | |
| return (state = defaultState, { type, payload }) => { | |
| return produce(state, draft => { | 
  
    
      This file contains hidden or 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 produce from "immer"; | |
| const feeds = createReducer( | |
| { | |
| [fetchFeeds.success]: (draft, payload) => { | |
| draft.ids = payload.map(({ _id }) => _id); | |
| draft.byId = payload.reduce((acc, feed) => { | |
| acc[feed._id] = feed; | |
| return acc; | |
| }, {}); | 
  
    
      This file contains hidden or 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
    
  
  
    
  | // toto je zodpovedne za fetch data | |
| const withScreen = (WrappedCompoennt) => | |
| class Fetcher extends React.Component { | |
| componentDidMount() { | |
| this.props.fetchUserInfo() | |
| } | |
| render() { | |
| const { fetchUserInfo, fetched?, ...childProps } | |
| if (this.props.fetched?) { | 
  
    
      This file contains hidden or 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
    
  
  
    
  | // Demography/index.js si importnes | |
| import { Average, Trends } from "./Age"; | |
| import { Ratio, RatioByAge } from "./Gender"; | |
| import { ByHoursInWeek } from "./Punchart"; | |
| import { ByStores } from "./Table"; | |
| render() .... | |
| // Age.js vyzerat takto | |
| import React from "react"; | 
NewerOlder