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
// | |
// TabView+TabBarHidden.swift | |
// Burnout | |
// | |
// Created by user on 09.07.2020. | |
// Copyright © 2020 quarrant. All rights reserved. | |
// | |
import SwiftUI |
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 path = require('path'); | |
const fs = require('fs'); | |
const appJson = require('../app.json'); | |
const rootDirectory = process.cwd(); | |
const resourcesImagesPath = path.resolve(rootDirectory, 'resources/images'); | |
const imagesXcassetsPath = path.resolve(rootDirectory, 'ios', appJson.name, 'Images.xcassets'); | |
const androidResPath = path.resolve(rootDirectory, 'android/app/src/main/res'); |
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 { View, Animated, Text, StyleSheet, LayoutChangeEvent, LayoutRectangle } from 'react-native'; | |
interface Props { | |
sections: any[]; | |
} | |
interface State { | |
sectionsLayouts: LayoutRectangle[]; | |
sectionHeaderNodes: { |
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 { View, StyleSheet, Picker } from 'react-native'; | |
class ColumnPicker extends React.Component<{ data: string[] }> { | |
state = { selectedValue: undefined }; | |
private renderItem = (item: string) => { | |
return <Picker.Item key={item} label={item} value={item} />; | |
}; |
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 { observable, action, computed } from 'mobx'; | |
import { Platform, NativeModules } from 'react-native'; | |
import replace from 'lodash/replace'; | |
enum Locales { | |
ru = 'ru', | |
en = 'en' | |
} | |
type TLocale = keyof typeof Locales; |
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
interface Props { | |
text: string | undefined; | |
lines: number; | |
onCollapse?: () => void; | |
showMoreButton?: boolean; | |
isActive?: boolean; | |
} | |
const FONT_SIZE = 13; |
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 Interactable, { IDragEvent, INativeDragEvent } from 'react-native-interactable'; | |
import { StyleSheet, TouchableOpacity, View, FlatList, GestureResponderEvent } from 'react-native'; | |
export type InteractableListItemRefType = React.Component<Interactable.IInteractableView, {}, any> | null | undefined; | |
export interface ICommonProps { | |
onPress?: (event: GestureResponderEvent) => void | null, | |
rightButtons: Array<React.ReactElement<any>>, | |
leftButtons: Array<React.ReactElement<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 { AsyncStorage } from 'react-native'; | |
import _ from 'lodash'; | |
loadFromCache(model, limit = 0) { | |
return new Promise((resolve, reject) => { | |
_getModelFromAsyncStorage(model) | |
.then(results => { | |
if (!results) resolve([]); | |
if (_.isArray(results) && limit > 0 && results.length > limit) { | |
results = results.slice(Math.max(results.length - limit, 1)); |