text stringlengths 9 39.2M | dir stringlengths 25 226 | lang stringclasses 163
values | created_date timestamp[s] | updated_date timestamp[s] | repo_name stringclasses 751
values | repo_full_name stringclasses 752
values | star int64 1.01k 183k | len_tokens int64 1 18.5M |
|---|---|---|---|---|---|---|---|---|
```javascript
/* @flow strict-local */
/* eslint-disable no-shadow */
import { useRef, useState, useCallback, useEffect, useMemo } from 'react';
import { TextInput } from 'react-native';
import type { SelectionChangeEvent } from 'react-native/Libraries/Components/TextInput/TextInput';
import { usePrevious } from './r... | /content/code_sandbox/src/useUncontrolledInput.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 670 |
```javascript
/* @flow strict-local */
const isDevelopment = process.env.NODE_ENV === 'development';
type Config = {|
requestLongTimeoutMs: number,
messagesPerRequest: number,
messageListThreshold: number,
enableReduxLogging: boolean,
enableErrorConsoleLogging: boolean,
appOwnDomains: $ReadOnlyArray<string... | /content/code_sandbox/src/config.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 200 |
```javascript
/* @flow strict-local */
import React from 'react';
import type { Node } from 'react';
import { View, Image } from 'react-native';
import ZulipText from '../common/ZulipText';
import { createStyleSheet } from '../styles';
const styles = createStyleSheet({
description: {
flexDirection: 'row',
j... | /content/code_sandbox/src/start/RealmInfo.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 225 |
```javascript
/* @flow strict-local */
import React, { PureComponent } from 'react';
import type { ComponentType } from 'react';
import { View } from 'react-native';
import type { RouteProp } from '../react-navigation';
import type { AppNavigationProp } from '../nav/AppNavigator';
import type { GlobalDispatch } from '... | /content/code_sandbox/src/start/PasswordAuthScreen.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 1,115 |
```javascript
/* @flow strict-local */
import React, { PureComponent } from 'react';
import type { ComponentType } from 'react';
import { Linking, Platform } from 'react-native';
import type { AppleAuthenticationCredential } from 'expo-apple-authentication';
import * as AppleAuthentication from 'expo-apple-authenticat... | /content/code_sandbox/src/start/AuthScreen.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 2,470 |
```javascript
/* @flow strict-local */
import { NativeModules, Platform } from 'react-native';
import * as WebBrowser from 'expo-web-browser';
import type { Auth } from '../types';
import { openLinkEmbedded } from '../utils/openLink';
import { isUrlOnRealm, tryParseUrl } from '../utils/url';
import { base64ToHex, hexT... | /content/code_sandbox/src/start/webAuth.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 857 |
```javascript
/* @flow strict-local */
import React, { useCallback } from 'react';
import type { Node } from 'react';
import { Keyboard, View, TextInput } from 'react-native';
import { useFocusEffect } from '@react-navigation/native';
import type { RouteProp } from '../react-navigation';
import type { AppNavigationPro... | /content/code_sandbox/src/start/RealmInputScreen.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 2,469 |
```javascript
/* @flow strict-local */
import React, { PureComponent } from 'react';
import type { ComponentType } from 'react';
import { ActivityIndicator, View, FlatList } from 'react-native';
import type { RouteProp } from '../react-navigation';
import type { AppNavigationProp } from '../nav/AppNavigator';
import ... | /content/code_sandbox/src/start/DevAuthScreen.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 986 |
```javascript
/* @flow strict-local */
import React, { PureComponent } from 'react';
import type { Node } from 'react';
import { Image, Text, View, Platform } from 'react-native';
import { openLinkExternal } from '../utils/openLink';
import Touchable from '../common/Touchable';
import { BRAND_COLOR, createStyleSheet }... | /content/code_sandbox/src/start/CompatibilityScreen.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 470 |
```javascript
/* @flow strict-local */
import { authFromCallbackUrl } from '../webAuth';
import * as eg from '../../__tests__/lib/exampleData';
describe('authFromCallbackUrl', () => {
const otp = '13579bdf';
test('success', () => {
const url = `zulip://login?realm=${eg.realm.toString()}&email=a@b&otp_encrypte... | /content/code_sandbox/src/start/__tests__/webAuth-test.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 272 |
```javascript
/* @flow strict-local */
import { activeAuthentications } from '../AuthScreen';
describe('activeAuthentications: external_authentication_methods (server v2.1+ API)', () => {
test('clobbers hardcoded info for same methods', () => {
expect(
activeAuthentications({ google: true }, [
{
... | /content/code_sandbox/src/start/__tests__/AuthScreen-test.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 352 |
```javascript
/* @flow strict-local */
import React from 'react';
import type { Node } from 'react';
import { View, Image, TouchableWithoutFeedback } from 'react-native';
import type { ViewStyleProp } from 'react-native/Libraries/StyleSheet/StyleSheet';
import type { ThemeName } from '../../reduxTypes';
import { creat... | /content/code_sandbox/src/start/IosCompliantAppleAuthButton/Custom.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 525 |
```javascript
/* @flow strict-local */
import React, { useState, useEffect } from 'react';
import type { Node } from 'react';
import { View, useColorScheme } from 'react-native';
import type { ViewStyle } from 'react-native/Libraries/StyleSheet/StyleSheet';
import * as AppleAuthentication from 'expo-apple-authenticatio... | /content/code_sandbox/src/start/IosCompliantAppleAuthButton/index.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 602 |
```javascript
/* @flow strict-local */
import React, { useState, useCallback } from 'react';
import type { Node } from 'react';
import type { RouteProp } from '../react-navigation';
import type { AppNavigationProp } from '../nav/AppNavigator';
import type { UserOrBot } from '../types';
import { useSelector, useDispatc... | /content/code_sandbox/src/user-picker/NewGroupPmScreen.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 344 |
```javascript
/* @flow strict-local */
import React from 'react';
import type { Node } from 'react';
import { View } from 'react-native';
import type { UserId, UserOrBot } from '../types';
import UserAvatarWithPresence from '../common/UserAvatarWithPresence';
import ComponentWithOverlay from '../common/ComponentWithOv... | /content/code_sandbox/src/user-picker/AvatarItem.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 475 |
```javascript
/* @flow strict-local */
import React from 'react';
import type { Node } from 'react';
import { FlatList } from 'react-native';
import type { UserId, UserOrBot } from '../types';
import AvatarItem from './AvatarItem';
type Props = $ReadOnly<{|
users: $ReadOnlyArray<UserOrBot>,
listRef: React$Ref<typ... | /content/code_sandbox/src/user-picker/AvatarList.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 189 |
```javascript
/* @flow strict-local */
import React, { useCallback, useState } from 'react';
import type { Node } from 'react';
import type { RouteProp } from '../react-navigation';
import type { AppNavigationProp } from '../nav/AppNavigator';
import Screen from '../common/Screen';
import UserList from '../users/UserL... | /content/code_sandbox/src/user-picker/New1to1PmScreen.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 327 |
```javascript
/* @flow strict-local */
import type { OutboxState, PerAccountApplicableAction, Outbox } from '../types';
import {
REGISTER_COMPLETE,
MESSAGE_SEND_START,
EVENT_NEW_MESSAGE,
DELETE_OUTBOX_MESSAGE,
MESSAGE_SEND_COMPLETE,
RESET_ACCOUNT_DATA,
} from '../actionConstants';
import { NULL_ARRAY } from... | /content/code_sandbox/src/outbox/outboxReducer.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 339 |
```javascript
/* @flow strict-local */
import React, { useState, useRef, useEffect } from 'react';
import type { Node } from 'react';
import { View, FlatList } from 'react-native';
import { createSelector } from 'reselect';
import { usePrevious } from '../reactUtils';
import type { User, UserId, UserOrBot, Selector } ... | /content/code_sandbox/src/user-picker/UserPickerCard.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 768 |
```javascript
/* @flow strict-local */
import deepFreeze from 'deep-freeze';
import outboxReducer from '../outboxReducer';
import { MESSAGE_SEND_START } from '../../actionConstants';
import * as eg from '../../__tests__/lib/exampleData';
describe('outboxReducer', () => {
describe('RESET_ACCOUNT_DATA', () => {
... | /content/code_sandbox/src/outbox/__tests__/outboxReducer-test.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 813 |
```javascript
/* @flow strict-local */
// $FlowFixMe[untyped-import]
import parseMarkdown from 'zulip-markdown-parser';
import invariant from 'invariant';
import { ApiError } from '../api/apiErrors';
import { showErrorAlert } from '../utils/info';
import * as logging from '../utils/logging';
import type {
PerAccount... | /content/code_sandbox/src/outbox/outboxActions.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 1,793 |
```javascript
// @flow strict-local
import type { ComponentType } from 'react';
import { typesEquivalent } from '../generics';
import type { OwnProps } from '../react-redux';
// A slight abbreviation to make some test cases more compact.
type OwnPropsOf<P, -SP, -D> = OwnProps<ComponentType<P>, SP, D>;
// prettier-ig... | /content/code_sandbox/src/__flow-tests__/react-redux-test.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 599 |
```javascript
/* @flow strict-local */
import { usePrevious } from '../reactUtils';
function test_usePrevious() {
declare var b: boolean;
// With no initial value, returns T | void:
{
(usePrevious(b): boolean | void);
// In particular, make sure the type knows the return value can be void.
// (This... | /content/code_sandbox/src/__flow-tests__/reactUtils-test.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 252 |
```javascript
/**
* Type-tests for navigation.
*
* @flow strict-local
*/
import React, { type ComponentType } from 'react';
import { createStackNavigator, type StackNavigationProp } from '@react-navigation/stack';
import { type RouteProp, type RouteParamsOf } from '../react-navigation';
// Test that `RouteProp` ... | /content/code_sandbox/src/__flow-tests__/nav-test.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 583 |
```javascript
/* @flow strict-local */
import type { Action } from '../types';
// Assert that Action does not allow arbitrary objects.
{
const foo = { nonexistent_key: 'bar' };
// $FlowExpectedError[incompatible-type]
const bar: Action = foo;
}
``` | /content/code_sandbox/src/__flow-tests__/types-test.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 58 |
```javascript
/* @flow strict-local */
import type AnimatedValue from 'react-native/Libraries/Animated/nodes/AnimatedValue';
import type { DimensionValue } from 'react-native/Libraries/StyleSheet/StyleSheetTypes';
import type { ViewStyleProp } from 'react-native/Libraries/StyleSheet/StyleSheet';
import type { IsSupert... | /content/code_sandbox/src/__flow-tests__/reactNativeUtils-test.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 287 |
```javascript
/* @flow strict-local */
import { EventTypes } from '../api/eventTypes';
import type { PerAccountApplicableAction, StreamsState, StreamUpdateEvent } from '../types';
import type { Stream, Subscription } from '../api/modelTypes';
import { ensureUnreachable } from '../types';
import { EVENT, REGISTER_COMPLE... | /content/code_sandbox/src/streams/streamsReducer.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 727 |
```javascript
/* @flow strict-local */
import React, { useContext } from 'react';
import type { Node } from 'react';
import { View } from 'react-native';
// $FlowFixMe[untyped-import]
import { useActionSheet } from '@expo/react-native-action-sheet';
import styles, { BRAND_COLOR, createStyleSheet } from '../styles';
im... | /content/code_sandbox/src/streams/TopicItem.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 942 |
```javascript
/* @flow strict-local */
import React from 'react';
import type { Node } from 'react';
import type { TextStyleProp } from 'react-native/Libraries/StyleSheet/StyleSheet';
import { IconMute, IconStream, IconPrivate, IconWebPublic } from '../common/Icons';
type Props = $ReadOnly<{|
color?: string,
isPr... | /content/code_sandbox/src/streams/StreamIcon.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 228 |
```javascript
/* @flow strict-local */
import React, { useCallback, useContext } from 'react';
import type { Node } from 'react';
import { TranslationContext } from '../boot/TranslationProvider';
import type { RouteProp } from '../react-navigation';
import type { AppNavigationProp } from '../nav/AppNavigator';
import ... | /content/code_sandbox/src/streams/CreateStreamScreen.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 616 |
```javascript
/* @flow strict-local */
import { type BoundedDiff, typesEquivalent } from '../generics';
import type { IsSupertype } from '../types';
/** General tip on writing tests for fancy generic types like these. */
// prettier-ignore
function demo_need_value_flow() {
// A basic principle of how Flow works is t... | /content/code_sandbox/src/__flow-tests__/generics-tests.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 7,289 |
```javascript
/* @flow strict-local */
import React, { useCallback, useMemo } from 'react';
import type { Node } from 'react';
import { View, SectionList } from 'react-native';
import { useNavigation } from '../react-navigation';
import type { RouteProp } from '../react-navigation';
import type { AppNavigationProp } ... | /content/code_sandbox/src/streams/SubscriptionsScreen.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 802 |
```javascript
/* @flow strict-local */
import type { Subscription } from '../types';
/**
* Whether push notifications are enabled for this stream.
*
* The `userSettingsStreamNotification` parameter should correspond to
* `state.settings.streamNotification`.
*/
export default (
subscription: Subscription | void,... | /content/code_sandbox/src/streams/getIsNotificationEnabled.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 80 |
```javascript
/* @flow strict-local */
import React, { useState, useCallback } from 'react';
import type { Node } from 'react';
import type { RouteProp } from '../react-navigation';
import type { AppNavigationProp } from '../nav/AppNavigator';
import type { UserOrBot } from '../types';
import { useSelector } from '../... | /content/code_sandbox/src/streams/InviteUsersScreen.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 356 |
```javascript
/* @flow strict-local */
import type { Stream, ThunkAction } from '../types';
import * as api from '../api';
import { getAuth, getZulipFeatureLevel } from '../selectors';
import { ensureUnreachable } from '../generics';
import type { SubsetProperties } from '../generics';
export type Privacy = 'web-publi... | /content/code_sandbox/src/streams/streamsActions.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 813 |
```javascript
/* @flow strict-local */
import React from 'react';
import type { Node } from 'react';
import { View } from 'react-native';
import type { Stream, Subscription } from '../types';
import styles, { createStyleSheet } from '../styles';
import ZulipText from '../common/ZulipText';
import StreamIcon from './St... | /content/code_sandbox/src/streams/StreamCard.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 366 |
```javascript
/* @flow strict-local */
import React, { useCallback, useRef, useContext } from 'react';
import type { Node } from 'react';
import type { RouteProp } from '../react-navigation';
import type { AppNavigationProp } from '../nav/AppNavigator';
import { useSelector, useDispatch } from '../react-redux';
import... | /content/code_sandbox/src/streams/EditStreamScreen.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 507 |
```javascript
/* @flow strict-local */
import React, { useCallback } from 'react';
import type { Node } from 'react';
import { View } from 'react-native';
import type { RouteProp } from '../react-navigation';
import type { AppNavigationProp } from '../nav/AppNavigator';
import { useSelector } from '../react-redux';
im... | /content/code_sandbox/src/streams/StreamSettingsScreen.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 1,150 |
```javascript
/* @flow strict-local */
import React, { useContext, useMemo } from 'react';
import type { Node } from 'react';
import { View, Pressable } from 'react-native';
// $FlowFixMe[untyped-import]
import { useActionSheet } from '@expo/react-native-action-sheet';
import { showErrorAlert } from '../utils/info';
i... | /content/code_sandbox/src/streams/StreamItem.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 1,772 |
```javascript
/* @flow strict-local */
import React, { useState, useCallback, useMemo, useEffect, useContext } from 'react';
import type { Node } from 'react';
import { View } from 'react-native';
import type { Privacy } from './streamsActions';
import { ensureUnreachable } from '../types';
import { useSelector } from... | /content/code_sandbox/src/streams/EditStreamCard.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 2,853 |
```javascript
/* @flow strict-local */
import deepFreeze from 'deep-freeze';
import * as eg from '../../__tests__/lib/exampleData';
import { EventTypes, type StreamEvent } from '../../api/eventTypes';
import { EVENT } from '../../actionConstants';
import streamsReducer from '../streamsReducer';
const mkAction = <E: ... | /content/code_sandbox/src/streams/__tests__/streamsReducer-test.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 1,349 |
```javascript
/* @flow strict-local */
import { Platform, Share } from 'react-native';
import { downloadImage, downloadFileToCache } from './download';
import type { Auth } from '../types';
import ShareFileAndroid from '../nativeModules/ShareFileAndroid';
import { showToast } from '../utils/info';
import * as api from... | /content/code_sandbox/src/lightbox/shareImage.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 451 |
```javascript
/* @flow strict-local */
import React, { useState, useCallback } from 'react';
import type { Node } from 'react';
import { View, LayoutAnimation } from 'react-native';
// $FlowFixMe[untyped-import]
import PhotoView from 'react-native-photo-view';
// $FlowFixMe[untyped-import]
import { useActionSheet } fr... | /content/code_sandbox/src/lightbox/Lightbox.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 975 |
```javascript
/* @flow strict-local */
import React from 'react';
import type { Node } from 'react';
import { Text, View, Pressable } from 'react-native';
import type { ViewStyleProp } from 'react-native/Libraries/StyleSheet/StyleSheet';
import { SafeAreaView } from 'react-native-safe-area-context';
import { Icon } fr... | /content/code_sandbox/src/lightbox/LightboxFooter.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 353 |
```javascript
/* @flow strict-local */
import { Platform, PermissionsAndroid } from 'react-native';
import type { Rationale } from 'react-native/Libraries/PermissionsAndroid/PermissionsAndroid';
import { CameraRoll } from '@react-native-camera-roll/camera-roll';
import RNFetchBlob from 'rn-fetch-blob';
import type { A... | /content/code_sandbox/src/lightbox/download.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 733 |
```javascript
/* @flow strict-local */
import React from 'react';
import type { Node } from 'react';
import { View } from 'react-native';
import type { Message } from '../types';
import type { RouteProp } from '../react-navigation';
import type { AppNavigationProp } from '../nav/AppNavigator';
import { createStyleShee... | /content/code_sandbox/src/lightbox/LightboxScreen.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 212 |
```javascript
/* @flow strict-local */
import React from 'react';
import type { Node } from 'react';
import { View, Pressable } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { shortTime, humanDate } from '../utils/date';
import { createStyleSheet } from '../styles';
import ... | /content/code_sandbox/src/lightbox/LightboxHeader.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 685 |
```javascript
/* @flow strict-local */
import { Share } from 'react-native';
import { BRAND_COLOR } from '../styles';
export default (url: string) => {
const shareOptions = {
message: url,
title: 'Shared using Zulip!',
};
Share.share(shareOptions, { tintColor: BRAND_COLOR }).catch(err => {});
};
``` | /content/code_sandbox/src/lightbox/share.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 76 |
```javascript
/* @flow strict-local */
import type { Auth } from '../types';
import { downloadImage } from './download';
import share from './share';
import shareImage from './shareImage';
import { showToast } from '../utils/info';
import * as api from '../api';
import { openLinkEmbedded } from '../utils/openLink';
ty... | /content/code_sandbox/src/lightbox/LightboxActionSheet.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 513 |
```javascript
/* @flow strict-local */
import { createSelector } from 'reselect';
import type { Narrow, Selector, UserOrBot } from '../types';
import { getTyping } from '../directSelectors';
import { userIdsOfPmNarrow, isPmNarrow } from '../utils/narrow';
import { pmTypingKeyFromPmKeyIds } from '../utils/recipient';
i... | /content/code_sandbox/src/typing/typingSelectors.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 267 |
```javascript
/* @flow strict-local */
import type { PerAccountApplicableAction, TypingState } from '../types';
import {
EVENT_TYPING_START,
EVENT_TYPING_STOP,
CLEAR_TYPING,
RESET_ACCOUNT_DATA,
REGISTER_COMPLETE,
} from '../actionConstants';
import { pmTypingKeyFromRecipients } from '../utils/recipient';
impo... | /content/code_sandbox/src/typing/typingReducer.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 673 |
```javascript
/* @flow strict-local */
import type { PerAccountAction, ThunkAction } from '../types';
import { sleep } from '../utils/async';
import { getTyping } from '../directSelectors';
/**
* The value to use for `server_typing_started_expiry_period_milliseconds`.
*
* The corresponding old server setting was `... | /content/code_sandbox/src/typing/typingActions.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 552 |
```javascript
/* @flow strict-local */
import { getCurrentTypingUsers } from '../typingSelectors';
import { HOME_NARROW, pm1to1NarrowFromUser, pmNarrowFromUsersUnsafe } from '../../utils/narrow';
import { NULL_ARRAY } from '../../nullObjects';
import * as eg from '../../__tests__/lib/exampleData';
import {
pmKeyReci... | /content/code_sandbox/src/typing/__tests__/typingSelectors-test.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 999 |
```javascript
/* @flow strict-local */
import deepFreeze from 'deep-freeze';
import type { PerAccountAction, User } from '../../types';
import { EVENT_TYPING_START, EVENT_TYPING_STOP } from '../../actionConstants';
import typingReducer from '../typingReducer';
import { NULL_OBJECT } from '../../nullObjects';
import *... | /content/code_sandbox/src/typing/__tests__/typingReducer-test.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 1,466 |
```javascript
/* @flow strict-local */
import type { InputSelection } from '../types';
export default (
textWhole: string,
selection: InputSelection,
): {| lastWordPrefix: string, filter: string |} => {
const { start, end } = selection;
let text = textWhole;
if (start === end && start !== text.length) {
... | /content/code_sandbox/src/autocomplete/getAutocompleteFilter.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 249 |
```javascript
/* @flow strict-local */
import React, { useCallback } from 'react';
import type { Node } from 'react';
import { FlatList } from 'react-native';
import type { Narrow } from '../types';
import Popup from '../common/Popup';
import EmojiRow from '../emoji/EmojiRow';
import { getFilteredEmojis } from '../em... | /content/code_sandbox/src/autocomplete/EmojiAutocomplete.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 379 |
```javascript
/* @flow strict-local */
import React, { useEffect } from 'react';
import type { Node } from 'react';
import { FlatList } from 'react-native';
import type { Narrow } from '../types';
import { createStyleSheet } from '../styles';
import { useDispatch, useSelector } from '../react-redux';
import { getTopi... | /content/code_sandbox/src/autocomplete/TopicAutocomplete.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 582 |
```javascript
/* @flow strict-local */
import type { InputSelection } from '../types';
export default (textWhole: string, autocompleteText: string, selection: InputSelection): string => {
const { start, end } = selection;
let remainder = '';
let text = textWhole;
if (start === end && start !== text.length) {
... | /content/code_sandbox/src/autocomplete/getAutocompletedText.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 183 |
```javascript
/* @flow strict-local */
import React, { useCallback, useContext } from 'react';
import type { Node } from 'react';
import { SectionList } from 'react-native';
import type { UserOrBot, UserGroup, Narrow } from '../types';
import { useSelector } from '../react-redux';
import { getMutedUsers, getSortedUse... | /content/code_sandbox/src/autocomplete/PeopleAutocomplete.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 1,034 |
```javascript
/* @flow strict-local */
import React, { useCallback, useContext, useMemo } from 'react';
import type { Node } from 'react';
import { View } from 'react-native';
import * as typeahead from '@zulip/shared/lib/typeahead';
import type { GetText, Narrow } from '../types';
import { IconWildcardMention } from ... | /content/code_sandbox/src/autocomplete/WildcardMentionItem.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 1,594 |
```javascript
/* @flow strict-local */
import React, { useCallback } from 'react';
import type { Node } from 'react';
import type { InputSelection, Narrow } from '../types';
import getAutocompletedText from './getAutocompletedText';
import getAutocompleteFilter from './getAutocompleteFilter';
import EmojiAutocomplete ... | /content/code_sandbox/src/autocomplete/AutocompleteView.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 510 |
```javascript
/* @flow strict-local */
import React, { useCallback } from 'react';
import type { Node } from 'react';
import { FlatList } from 'react-native';
import type { Narrow } from '../types';
import { useSelector } from '../react-redux';
import Popup from '../common/Popup';
import { getSubscriptions } from '..... | /content/code_sandbox/src/autocomplete/StreamAutocomplete.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 431 |
```javascript
/* @flow strict-local */
import getAutocompletedText from '../getAutocompletedText';
describe('getAutocompletedText', () => {
let selection = { start: 3, end: 3 };
test('can autocomplete users', () => {
expect(getAutocompletedText('@ab', '**abcd**', selection)).toEqual('@**abcd** ');
});
te... | /content/code_sandbox/src/autocomplete/__tests__/getAutocompletedText-test.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 337 |
```javascript
/* @flow strict-local */
import getAutocompleteFilter from '../getAutocompleteFilter';
describe('getAutocompleteFilter', () => {
let selection = { start: 0, end: 0 };
test('get empty object for empty text', () => {
expect(getAutocompleteFilter('', selection)).toEqual({ filter: '', lastWordPrefix... | /content/code_sandbox/src/autocomplete/__tests__/getAutocompleteFilter-test.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 1,311 |
```javascript
/* @flow strict-local */
import React from 'react';
import type { Node } from 'react';
import { View } from 'react-native';
import type { ViewStyleProp } from 'react-native/Libraries/StyleSheet/StyleSheet';
import { createStyleSheet } from '../styles';
const styles = createStyleSheet({
wrapper: {
... | /content/code_sandbox/src/common/ComponentWithOverlay.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 546 |
```javascript
/* @flow strict-local */
import React, { useState, useCallback } from 'react';
import type { Node } from 'react';
import { View } from 'react-native';
import Input from './Input';
import type { Props as InputProps } from './Input';
import { BRAND_COLOR, createStyleSheet } from '../styles';
import ZulipTe... | /content/code_sandbox/src/common/PasswordInput.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 423 |
```javascript
/* @flow strict-local */
import * as React from 'react';
import { View } from 'react-native';
// $FlowFixMe[untyped-import]
import Color from 'color';
import type { LocalizableReactText } from '../types';
import { kWarningColor } from '../styles/constants';
import { createStyleSheet } from '../styles';
... | /content/code_sandbox/src/common/AlertItem.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 489 |
```javascript
// @flow strict-local
import React, { type Node } from 'react';
import { Text, View } from 'react-native';
// eslint-disable-next-line import/extensions
import codePointMap from '../../static/assets/fonts/zulip-icons.map.js';
type Props = $ReadOnly<{|
...$Exact<React$ElementConfig<typeof Text>>,
nam... | /content/code_sandbox/src/common/ZulipIcon.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 502 |
```javascript
/* @flow strict-local */
import React from 'react';
import type { ComponentType } from 'react';
import { Text } from 'react-native';
import type { IconProps as IconPropsBusted } from 'react-native-vector-icons';
import Feather from 'react-native-vector-icons/Feather';
import type { FeatherGlyphs } from 'r... | /content/code_sandbox/src/common/Icons.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 1,508 |
```javascript
/* @flow strict-local */
import React, { useState, useCallback, useContext } from 'react';
import type { Node } from 'react';
import { TextInput, Platform } from 'react-native';
import type { LocalizableText } from '../types';
import { createStyleSheet, ThemeContext, HALF_COLOR, BORDER_COLOR } from '../s... | /content/code_sandbox/src/common/Input.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 497 |
```javascript
/* @flow strict-local */
import React from 'react';
import type { Node } from 'react';
import { Image, View } from 'react-native';
import SpinningProgress from './SpinningProgress';
import { createStyleSheet } from '../styles';
import messageLoadingImg from '../../static/img/message-loading.png';
const ... | /content/code_sandbox/src/common/LoadingIndicator.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 390 |
```javascript
/* @flow strict-local */
import React from 'react';
import type { Node } from 'react';
import { View } from 'react-native';
import ZulipTextIntl from './ZulipTextIntl';
import { createStyleSheet } from '../styles';
const styles = createStyleSheet({
field: {
flexDirection: 'row',
marginTop: 5,
... | /content/code_sandbox/src/common/ErrorMsg.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 221 |
```javascript
/* @flow strict-local */
import { useState, useCallback, useRef } from 'react';
import { useConditionalEffect, useDebugAssertConstant, useHasStayedTrueForMs } from '../reactUtils';
import { tryFetch } from '../message/fetchActions';
type SuccessResult<TData> = {| +type: 'success', +data: TData |};
type ... | /content/code_sandbox/src/common/useFetchedDataWithRefresh.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 774 |
```javascript
/* @flow strict-local */
import React, { useContext } from 'react';
import type { Node } from 'react';
import { View, useColorScheme } from 'react-native';
import { ThemeContext, createStyleSheet } from '../styles';
import { useGlobalSelector } from '../react-redux';
import { getGlobalSettings } from '..... | /content/code_sandbox/src/common/Popup.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 486 |
```javascript
/* @flow strict-local */
import React from 'react';
import type { Node } from 'react';
import { View } from 'react-native';
// $FlowFixMe[untyped-import]
import Color from 'color';
import Touchable from './Touchable';
import { createStyleSheet } from '../styles';
import { colorHashFromString } from '../u... | /content/code_sandbox/src/common/GroupAvatar.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 391 |
```javascript
/* @flow strict-local */
import React from 'react';
import type { Node } from 'react';
import { View } from 'react-native';
import ComponentWithOverlay from './ComponentWithOverlay';
import UnreadCount from './UnreadCount';
import { BRAND_COLOR, createStyleSheet } from '../styles';
const styles = creat... | /content/code_sandbox/src/common/CountOverlay.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 271 |
```javascript
/* @flow strict-local */
import React from 'react';
import type { Node } from 'react';
import { View } from 'react-native';
import { createStyleSheet } from '../styles';
const styles = createStyleSheet({
separator: {
height: 1,
margin: 10,
backgroundColor: 'hsla(0, 0%, 50%, 0.75)',
},
})... | /content/code_sandbox/src/common/SectionSeparator.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 108 |
```javascript
/* @flow strict-local */
import React, { useContext, useMemo } from 'react';
import type { Node } from 'react';
import { View } from 'react-native';
import type { EmojiType, LocalizableReactText } from '../types';
import ZulipTextIntl from './ZulipTextIntl';
import Touchable from './Touchable';
import { ... | /content/code_sandbox/src/common/NavRow.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 933 |
```javascript
/* @flow strict-local */
import React, { useContext } from 'react';
import type { Node } from 'react';
import { View } from 'react-native';
import { useSelector } from '../react-redux';
import { getLoading } from '../selectors';
import ZulipTextIntl from './ZulipTextIntl';
import LoadingIndicator from '... | /content/code_sandbox/src/common/LoadingBanner.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 398 |
```javascript
/* @flow strict-local */
import React, { useContext } from 'react';
import type { Node } from 'react';
import { ScrollView, View } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import type { EditingEvent } from 'react-native/Libraries/Components/TextInput/TextInput';... | /content/code_sandbox/src/common/Screen.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 1,021 |
```javascript
/* @flow strict-local */
import React from 'react';
import type { Node } from 'react';
import { Switch } from 'react-native';
// $FlowFixMe[untyped-import]
import Color from 'color';
import { BRAND_COLOR } from '../styles';
type Props = $ReadOnly<{|
disabled?: boolean,
value: boolean,
onValueChange... | /content/code_sandbox/src/common/ZulipSwitch.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 367 |
```javascript
/* @flow strict-local */
import React from 'react';
import type { Node } from 'react';
import { View } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { createStyleSheet, HALF_COLOR } from '../styles';
import type { LocalizableReactText } from '../types';
impor... | /content/code_sandbox/src/common/ZulipBanner.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 692 |
```javascript
/* @flow strict-local */
import React from 'react';
import type { Node } from 'react';
import { View } from 'react-native';
import type { ViewStyleProp } from 'react-native/Libraries/StyleSheet/StyleSheet';
import type { SpecificIconType } from './Icons';
import { BRAND_COLOR, createStyleSheet } from '..... | /content/code_sandbox/src/common/FloatingActionButton.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 524 |
```javascript
/* @flow strict-local */
import React from 'react';
import type { Node, ElementConfig } from 'react';
import { TouchableHighlight, TouchableNativeFeedback, Platform, View } from 'react-native';
import type { ViewStyleProp } from 'react-native/Libraries/StyleSheet/StyleSheet';
import { HIGHLIGHT_COLOR } f... | /content/code_sandbox/src/common/Touchable.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 871 |
```javascript
/* @flow strict-local */
import React from 'react';
import type { Node } from 'react';
import { View } from 'react-native';
import { BRAND_COLOR, createStyleSheet } from '../styles';
import LoadingIndicator from './LoadingIndicator';
import ZulipStatusBar from './ZulipStatusBar';
const componentStyles =... | /content/code_sandbox/src/common/FullScreenLoading.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 247 |
```javascript
/* @flow strict-local */
import React, { useRef, useState, useCallback } from 'react';
import type { Node } from 'react';
import { View } from 'react-native';
import Input from './Input';
import type { Props as InputProps } from './Input';
import styles, { createStyleSheet, BRAND_COLOR } from '../styles'... | /content/code_sandbox/src/common/InputWithClearButton.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 453 |
```javascript
/* @flow strict-local */
import React, { PureComponent } from 'react';
import type { Node } from 'react';
import { View } from 'react-native';
import type { ViewStyleProp } from 'react-native/Libraries/StyleSheet/StyleSheet';
import styles, { createStyleSheet } from '../styles';
const componentStyles = ... | /content/code_sandbox/src/common/Centerer.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 336 |
```javascript
/* @flow strict-local */
import React from 'react';
import type { Node } from 'react';
import { Image } from 'react-native';
import AnimatedRotateComponent from '../animation/AnimatedRotateComponent';
import spinningProgressImg from '../../static/img/spinning-progress.png';
import spinningProgressBlackIm... | /content/code_sandbox/src/common/SpinningProgress.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 298 |
```javascript
/* @flow strict-local */
import React from 'react';
import type { Node } from 'react';
import { Text, View } from 'react-native';
import type { ViewStyleProp } from 'react-native/Libraries/StyleSheet/StyleSheet';
import { BRAND_COLOR, createStyleSheet } from '../styles';
import { foregroundColorFromBackg... | /content/code_sandbox/src/common/UnreadCount.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 490 |
```javascript
/* @flow strict-local */
import React from 'react';
import type { Node } from 'react';
import { FormattedMessage } from 'react-intl';
import type { BoundedDiff } from '../generics';
import ZulipText from './ZulipText';
import type { LocalizableReactText } from '../types';
type Props = $ReadOnly<{|
...... | /content/code_sandbox/src/common/ZulipTextIntl.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 357 |
```javascript
/* @flow strict-local */
import React, { useMemo } from 'react';
import type { Node } from 'react';
import { View } from 'react-native';
import type { LocalizableReactText } from '../types';
import { BRAND_COLOR, createStyleSheet } from '../styles';
import ZulipTextIntl from './ZulipTextIntl';
import Tou... | /content/code_sandbox/src/common/ZulipTextButton.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 789 |
```javascript
/* @flow strict-local */
import React, { useContext } from 'react';
import type { Node } from 'react';
import { View } from 'react-native';
import type { ViewStyleProp } from 'react-native/Libraries/StyleSheet/StyleSheet';
import { createStyleSheet, ThemeContext } from '../styles';
import { useSelector }... | /content/code_sandbox/src/common/PresenceStatusIndicator.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 1,025 |
```javascript
/* @flow strict-local */
import React from 'react';
import type { Node } from 'react';
import subWeeks from 'date-fns/subWeeks';
import ZulipBanner from './ZulipBanner';
import { useSelector, useDispatch } from '../react-redux';
import { getAccount, getSilenceServerPushSetupWarnings } from '../account/a... | /content/code_sandbox/src/common/ServerNotifsDisabledBanner.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 618 |
```javascript
/* @flow strict-local */
import React from 'react';
import type { Node } from 'react';
import { useSelector } from '../react-redux';
import UserAvatar from './UserAvatar';
import { getOwnUser } from '../users/userSelectors';
type Props = $ReadOnly<{|
size: number,
|}>;
/**
* Renders an image of the ... | /content/code_sandbox/src/common/OwnAvatar.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 139 |
```javascript
/* @flow strict-local */
// $FlowFixMe[untyped-import]
import Color from 'color';
import * as React from 'react';
import { View } from 'react-native';
import invariant from 'invariant';
import { useGlobalSelector } from '../react-redux';
import { getGlobalSettings } from '../directSelectors';
import type... | /content/code_sandbox/src/common/TextRow.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 886 |
```javascript
/* @flow strict-local */
import React, { useCallback, useRef, useMemo, useEffect, useContext } from 'react';
import type { Node } from 'react';
import { View } from 'react-native';
import invariant from 'invariant';
import { CommonActions } from '@react-navigation/native';
import type { LocalizableText }... | /content/code_sandbox/src/common/InputRowRadioButtons.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 1,486 |
```javascript
/* @flow strict-local */
import React, { useContext } from 'react';
import type { Node } from 'react';
import { View } from 'react-native';
import { ThemeContext, createStyleSheet } from '../styles';
import ZulipTextIntl from './ZulipTextIntl';
import type { LocalizableReactText } from '../types';
const... | /content/code_sandbox/src/common/SectionHeader.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 197 |
```javascript
/* @flow strict-local */
import React from 'react';
import type { Node } from 'react';
import { View } from 'react-native';
import ZulipTextIntl from './ZulipTextIntl';
import { createStyleSheet } from '../styles';
const styles = createStyleSheet({
container: {
flex: 1,
padding: 16,
margin... | /content/code_sandbox/src/common/SearchEmptyState.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 179 |
```javascript
/* @flow strict-local */
import React, { useContext, useMemo } from 'react';
import type { Node } from 'react';
import { View } from 'react-native';
import { useGlobalSelector } from '../react-redux';
import type { LocalizableText } from '../types';
import ZulipTextIntl from './ZulipTextIntl';
import Tou... | /content/code_sandbox/src/common/SelectableOptionRow.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 1,071 |
```javascript
/* @flow strict-local */
import React from 'react';
import type { Node } from 'react';
import { Image } from 'react-native';
import logoImg from '../../static/img/logo.png';
import { createStyleSheet } from '../styles';
const styles = createStyleSheet({
logo: {
width: 40,
height: 40,
margi... | /content/code_sandbox/src/common/Logo.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 114 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.