Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.apicall.testapp.MainActivity">
<TextView
android:layout_width="wrap_content"
@Ayyagaries
Ayyagaries / file.js
Created April 16, 2018 19:36
Component
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { StyleSheet, View } from 'react-native';
import {
Container,
Content,
Icon,
Item,
@Ayyagaries
Ayyagaries / reducer.js
Created April 17, 2018 05:04
Reducer Code
import {
REQUEST_REP_SEARCH,
SUCCESS_REP_SEARCH,
RESET_DATA,
SHOW_ALERT,
} from '../actions/searchReps';
const intitalState = {
showLoading: false,
repsFound: [],
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { StyleSheet, View, Alert } from 'react-native';
import Spinner from 'react-native-loading-spinner-overlay';
import {
Container,
Content,
Icon,
<Container>
<Content padder style={styles.content}>
<View style={styles.loading}>
<ActivityIndicator size="large" color="#0000ff" animating />
</View>
<Form>
<Item floatingLabel>
<Label>FirstName</Label>
<Input onChangeText={this.handleChangeFirstNameText} />
</Item>
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { StyleSheet, View, FlatList, TextInput, TouchableHighlight } from 'react-native';
import { Container, Content, Text, Button, Label, Item, Input, Icon } from 'native-base';
import { IntellicentricsThumbnail } from '../components/Logo';
import { resetData } from '../actions/searchReps';
class RepsList extends React.PureComponent {
static navigationOptions = {
render() {
const errorMessege = 'Please enter FirstName/LastName/Company/ID to search';
return (
<Container>
<Content padder style={styles.content}>
<Form>
<Item floatingLabel>
<Label>FirstName</Label>
<Input onChangeText={this.handleChangeFirstNameText} />
</Item>
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { StyleSheet, TextInput, FlatList, View, TouchableOpacity } from 'react-native';
import { Container, Content, Text, Button, Icon, ListItem, Body, Right, Badge } from 'native-base';
import { IntellicentricsThumbnail } from '../components/Logo';
import repscheckInPageOne from '../config/MockData/repsCheckedIn';
import { pickedRepForVisitDetails } from '../actions/repsCheckedIn';
class repsCheckedIn extends React.PureComponent {
import {
RESPONSE_REPS_CURRENTLY_CHECKED_IN,
RESPONSE_NEGATIVE_EVENTS,
SHOWLOADING,
REQUEST_NEGATIVE_EVENTS,
REQUEST_REPS_CURRENTLY_CHECKED_IN
} from "../actions/homescreen";
const initialState = {
reps_currently_checkedIn: [],
import { call, put, select, take, fork } from "redux-saga/effects";
import axios from "axios";
import Config from "react-native-config";
import _ from "lodash";
import querystring from "query-string";
import {
requestRepsCurrentlyCheckedIn,
requestNegativeEvents,
RESPONSE_REPS_CURRENTLY_CHECKED_IN,