Skip to content

Instantly share code, notes, and snippets.

View romreed's full-sized avatar
🏠
Working from home

Roman Sandu romreed

🏠
Working from home
View GitHub Profile
import {bindActionCreators, Dispatch} from "redux";
import {
addCar,
clearParkingCondition,
getParkingCondition,
ParkingItemType,
setCurrentCar,
UserProfileType
} from "../../actions/parking";
import {connect} from "react-redux";
import {NavigationActions} from 'react-navigation';
import {AsyncStorage} from "react-native"
export const AUTH_REQUEST = 'AUTH_REQUEST'
export const auth = (code) => ({type: AUTH_REQUEST, payload: code})
export const AUTH_SUCCESS = 'AUTH_SUCCESS'
export const authSuccess = (token) => ({type: AUTH_SUCCESS, payload: token})
export const AUTH_ERROR = 'AUTH_ERROR'
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import {
Container,
Header,
Content,
Card,
CardItem,
Thumbnail,
import {resetActionToMain, resetActionAuth} from './navigate'
import {NavigationActions} from 'react-navigation'
import {CALL_API, API_ROOT} from '../middleware/api'
import RNFetchBlob from 'react-native-fetch-blob'
import {Platform} from "react-native";
import {Toast} from "native-base"
export const DOWNLOAD_FILE_BEGIN = 'DOWNLOAD_FILE_BEGIN'
export const DOWNLOAD_FILE_SUCCESS = 'DOWNLOAD_FILE_SUCCESS'
export const DOWNLOAD_FILE_ERROR = 'DOWNLOAD_FILE_ERROR'
import {resetActionToMain, resetActionAuth} from './navigate'
import {NavigationActions} from 'react-navigation'
import {CALL_API, API_ROOT} from '../middleware/api'
import RNFetchBlob from 'react-native-fetch-blob'
import {Platform} from "react-native";
import IntentModule from '../native/intent'
export const DOWNLOAD_FILE_BEGIN = 'DOWNLOAD_FILE_BEGIN'
export const DOWNLOAD_FILE_SUCCESS = 'DOWNLOAD_FILE_SUCCESS'
export const DOWNLOAD_FILE_ERROR = 'DOWNLOAD_FILE_ERROR'
import React, {Component} from 'react';
import {Image, Platform, Dimensions, ScrollView, BackHandler} from "react-native";
import {
Content,
Thumbnail,
Body,
Text,
List,
ListItem,
Icon as Icons,
import React, {Component} from 'react';
import './App.css';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import AppBar from 'material-ui/AppBar';
import {List, ListItem} from 'material-ui/List';
// import MyAwesomeReactComponent from './MyAwesomeReactComponent';
let chanels = [
{"title": "43 Канал Туапсе", "url": "http://sochi-strk.ru:1936/strk/43Kanal.stream/playlist.m3u8"},
@romreed
romreed / enter event react
Created June 16, 2017 13:30
enter event react
add(event) {
if (event.key === 'Enter') {
this.props.search(this.state.value)
}
}
<TextField style={this.state.close === true ? styles.showInput : styles.hideInput}
id="text-field-controlled"
value={this.state.value}
inputStyle={styles.colorInput}
@romreed
romreed / react focus
Created June 16, 2017 13:30
react focus
if (this.focusInput) {
setTimeout(() => {
this.focusInput.focus()
}, 100);
}
@romreed
romreed / gist:e629bdea524395ca63b2d7e02eb1f3ac
Created May 21, 2017 20:22
Menu react.js material-ui
import React, {Component} from 'react'
import {browserHistory, Link} from 'react-router'
import './login.css';
import TextField from 'material-ui/TextField';
import Checkbox from 'material-ui/Checkbox';
import RaisedButton from 'material-ui/RaisedButton';
import PropTypes from 'prop-types';
import Snackbar from 'material-ui/Snackbar';
import {AppBar, Tabs, Tab} from 'material-ui'