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 { AsyncStorage } from 'react-native'; | |
const storeKey = (dbName, storeName, key) => dbName + '_' + storeName + '_' + key; | |
const stringify = JSON.stringify; | |
const parse = JSON.parse; | |
export const RNAsyncStorageAdapter = { | |
get(dbName, storeName, key) { | |
return AsyncStorage.getItem(storeKey(dbName, storeName, key)).then(value => parse(value)); | |
}, |
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, { Component } from 'react'; | |
import { StyleSheet, View,Text, Image, Animated, Dimensions } from 'react-native'; | |
import Interactable from 'react-native-interactable'; | |
const widthFactor = Dimensions.get('window').width / 375; | |
const heightFactor = (Dimensions.get('window').height - 75) / 667; | |
const showSecondFace = true; | |
const showThirdFace = true; | |
const showFourthFace = 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
// @flow | |
import type { | |
StyleObj, | |
} from 'react-native/Libraries/StyleSheet/StyleSheetTypes'; | |
import React from 'react'; | |
import PropTypes from 'prop-types'; | |
import { Text, View, StyleSheet } from 'react-native'; | |
import invariant from 'invariant'; |
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
class EventEmitter | |
/// Shared Instance. | |
public static var sharedInstance = EventEmitter() | |
// ReactNativeEventEmitter is instantiated by React Native with the bridge. | |
private static var eventEmitter: ReactNativeEventEmitter! | |
private init() {} |
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 { GoogleMapsAPIWrapper } from '@agm/core'; | |
import { Directive, Output, EventEmitter } from '@angular/core'; | |
declare var google: any; | |
@Directive({ | |
selector: 'agm-location-marker' | |
}) | |
export class AgmLocationMarker { | |
marker: any; |
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 Promise from 'promise-polyfill'; | |
window.Promise = window.Promise || Promise; | |
import axios from 'axios'; | |
import qs from 'qs'; | |
const DJANGO_DEFAULTS = { | |
xsrfCookieName: 'csrftoken', | |
xsrfHeaderName: 'X-CSRFToken', | |
headers: { |
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
/** | |
* Query blog posts by user -> paginated results and a total count. | |
* @param userId {ObjectId} ID of user to retrieve blog posts for | |
* @param startRow {Number} First row to return in results | |
* @param endRow {Number} Last row to return in results | |
* @param [filter] {Object} Optional extra matching query object | |
* @param [sort] {Object} Optional sort query object | |
* @returns {Object} Object -> `{ rows, count }` | |
*/ | |
function queryBlogPostsByUser (userId, startRow, endRow, filter = {}, sort = false) { |
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 { Subject } from 'rxjs/Subject'; | |
import { Store } from '@ngrx/store'; | |
import { Component, OnInit, OnDestroy, AfterViewInit } from '@angular/core'; | |
import { AppState } from '../../../root.reducer'; | |
@Component({ | |
selector: 'my-map-example', | |
template: ` | |
<sebm-google-map |
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
{ | |
"parser": "babel-eslint", | |
"plugins": [ | |
"react", | |
"react-native" | |
], | |
"parserOptions": { | |
"ecmaFeatures": { | |
"jsx": true, | |
"modules": 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
<ion-header no-shadow> | |
<ion-navbar no-border-bottom> | |
<ion-buttons start> | |
<button ion-button color="light" (click)="closeModal()">Cancel</button> | |
</ion-buttons> | |
<ion-title>Media</ion-title> | |
<ion-buttons end> | |
<ion-spinner *ngIf="!mediaLoaded" color="light"></ion-spinner> | |
</ion-buttons> |