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 { useState } from 'react'; | |
| import { Dimensions, KeyboardAvoidingViewProps, Platform, StyleSheet, View } from 'react-native'; | |
| import { useSafeAreaInsets } from 'react-native-safe-area-context'; | |
| import CommonKeyboardAvoidingView from '../KeyboardAvoidingView'; | |
| const { height: DEVICE_HEIGHT } = Dimensions.get('screen'); | |
| const IOSKeyboardAvoidingView = (props: KeyboardAvoidingViewProps) => { | |
| const insets = useSafeAreaInsets(); |
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 { useHeaderHeight } from "@react-navigation/elements"; | |
| import { | |
| KeyboardAvoidingView as RNKeyboardAvoidingView, | |
| KeyboardAvoidingViewProps as RNKeyboardAvoidingViewProps, | |
| Platform, | |
| StyleSheet, | |
| } from 'react-native'; | |
| const BEHAVIOR = Platform.OS === 'ios' ? 'padding' : undefined; |
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 { | |
| KeyboardAvoidingView as RNKeyboardAvoidingView, | |
| KeyboardAvoidingViewProps as RNKeyboardAvoidingViewProps, | |
| Platform, | |
| StyleSheet, | |
| } from 'react-native'; | |
| const BEHAVIOR = Platform.OS === 'ios' ? 'padding' : undefined; | |
| const KeyboardAvoidingView = ({ style, ...props }: RNKeyboardAvoidingViewProps) => ( |
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, { useRef, useState, useCallback, useEffect, memo } from 'react' | |
| import styled from 'styled-components' | |
| import { MEDIA } from 'src/styles' | |
| import { | |
| AntMediaCommands, | |
| AntMediaTakeConfigurationType, | |
| AntMediaTakeConfigurationSignal, | |
| AntMediaTakeCandidateSignal, |
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 {useCallback, useReducer, useEffect, Reducer} from 'react'; | |
| type GenericDataType = { | |
| id: string; | |
| }; | |
| type Action<T extends GenericDataType> = { | |
| type: 'PROCESS_ROW'; | |
| payload: T; | |
| }; |
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 { UserAPI } from '@datasources' | |
| import { GraphQLType, getGlobalId, updateLocalUser } from '@relay' | |
| // ... | |
| const onPressBlockUser = useCallback(async (blockedUserId: string) => { | |
| await UserAPI.blockUser({ blockedUserId }) | |
| updateLocalUser( | |
| getGlobalId({ type: GraphQLType.USER, resourceId: blockedUserId }), | |
| () => ({ isBlocked: 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
| import { GraphQLType, getGlobalId } from '@relay' | |
| // ... | |
| const onPressTag = useCallback((tag: TagDataFromREST) => { | |
| navigation.navigate(TagScreen.TAG_VIDEOS, { | |
| id: getGlobalId({ | |
| type: GraphQLType.GOLIVE_TAG, | |
| resourceId: tag.id, | |
| }), | |
| }) |
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 { ReleasyProvider, Config, Link, renderToStringWithData } from 'react-releasy'; | |
| const config = new Config({ | |
| link: new Link({ | |
| url: 'https://yourserveraddress.com/graphql', | |
| }), | |
| }); | |
| const Application = ( | |
| <ReleasyProvider config={config}> |
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 path from 'path'; | |
| import fs from 'fs'; | |
| import { ReleasyProvider, Config, Link, renderToStringWithData } from 'react-releasy'; | |
| // renderer middleware | |
| const filePath = path.resolve(__dirname, '..', 'build', 'index.html'); | |
| fs.readFile(filePath, 'utf8', (htmlErr, htmlData) => { | |
| if (htmlErr) { | |
| return res.status(404).end() | |
| } |
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
| "dependencies": { | |
| "react-relay": "https://github.com/releasy/relay/releases/download/v1.7.0-releasy/react-relay-1.7.0-releasy.tgz", | |
| }, | |
| "resolutions": { | |
| "react-relay": "https://github.com/releasy/relay/releases/download/v1.7.0-releasy/react-relay-1.7.0-releasy.tgz" | |
| }, |
NewerOlder