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
/** | |
* Sync additional meta after user profile update | |
* | |
* @access public | |
* @return void | |
*/ | |
public function after_update_user( $action, $entry, $form ) { | |
if (class_exists("FrmRegEntryHelper")) { |
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 FastImage from "react-native-fast-image"; | |
import AsyncStorage from '@react-native-community/async-storage'; | |
import moment from 'moment'; | |
import ImagePicker from 'react-native-image-crop-picker'; | |
import Sentry from 'modules/sentry'; | |
const CACHE_TIME_KEY = 'cacheTimestamp' | |
const timedClearCaches = async () => { | |
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 errorShapeFormatter = (thingToCatch: unknown) => { | |
if (thingToCatch instanceof Error) { | |
return thingToCatch as Error; | |
} | |
if (typeof thingToCatch === 'string') { | |
return new Error(thingToCatch); | |
} | |
if ( |
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, makeObservable } from 'mobx'; | |
class FilesUIStore { | |
constructor() { | |
makeObservable(this, { | |
isUploading: observable, | |
uploadLoadProgress: observable, | |
isCompressing: observable, | |
dontShowProgress: observable, | |
setIsUploading: action, |
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
/** | |
* @jest-environment jsdom | |
*/ | |
import { renderHook } from '@testing-library/react-hooks'; | |
import React from 'react'; | |
import fetchMock from 'jest-fetch-mock'; | |
import { mockAlekClient } from 'modules/mockdata'; | |
import { Client } from 'modules/typescript'; | |
import 'modules/config/src/globals'; |
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 apiFetch from 'modules/api-fetch'; | |
import Toast from 'modules/toast/index.native'; | |
import Sentry from 'modules/sentry'; | |
const FILE_CHUNK_SIZE = 5242880; | |
const uploadMultipart = async ( | |
file: string, | |
setIsUploading = (set: boolean) => {}, | |
setUploadProgress = (set: number) => {}, |
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
// Example config from https://medium.com/@kulor/creating-an-offline-first-react-native-app-5534d7794969 | |
import Config from 'modules/config'; | |
import agent, { buildUrl } from 'modules/agent'; | |
let online = true; | |
let timer = null as null | NodeJS.Timer; | |
const clearTimer = () => { | |
if (timer) { |
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
platform :ios, '10.0' | |
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' | |
require_relative '../node_modules/react-native-unimodules/cocoapods.rb' | |
target 'NFUMobileApp' do | |
# Pods for NFUMobileApp | |
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector" | |
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec" | |
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired" | |
pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety" |
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
/** | |
* Copyright (c) Facebook, Inc. and its affiliates. | |
* | |
* This source code is licensed under the MIT license found in the | |
* LICENSE file in the root directory of this source tree. | |
*/ | |
#import "AppDelegate.h" | |
#import <CodePush/CodePush.h> | |
#import <React/RCTBridge.h> |
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 moment from "moment"; | |
import { sendSlackNotification } from "../../functions"; | |
import AsyncStorage from "../../async-storage"; | |
import purgeClientLogs from "./purgeClientLogs"; | |
let currentlyWriting; | |
const awaitUntilDoneSubmitting = async () => | |
new Promise(resolve => { | |
const timerCheckSubmitted = setInterval(() => { |
NewerOlder