// @ts-nocheck
import React from 'react';
import { ActivityIndicator, StyleSheet, Text, View } from 'react-native';
import { RenderHTMLConfig, HTMLSourceUri } from '../shared-types';
const styles = StyleSheet.create({
alignCenter: {
flex: 1,
alignItems: 'center',
justifyContent: 'center'
},
errorText: {
fontStyle: 'italic',
fontSize: 16
}
});
export function defaultRenderError(source: HTMLSourceUri) {
return (
Failed to load HTML from {source.uri}
);
}
export function defaultRenderLoading() {
return (
);
}
const sourceLoaderContext = React.createContext<
Pick, 'remoteErrorView' | 'remoteLoadingView'>
>({
remoteErrorView: defaultRenderError,
remoteLoadingView: defaultRenderLoading
});
export default sourceLoaderContext;