-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.js
More file actions
27 lines (26 loc) · 783 Bytes
/
index.js
File metadata and controls
27 lines (26 loc) · 783 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import React from 'react';
import { Dimensions } from 'react-native';
import AutoHeightWebView from 'react-native-autoheight-webview';
export default ({
id,
shortname,
url = `https://isrmicha2.github.io/react-native-disqus-static/${id}`,
}) => {
if (!id || !shortname) {
throw new Error('Shortname or id missing!');
}
return (
<AutoHeightWebView
source={{
uri: `https://isrmicha2.github.io/react-native-disqus-static/?shortname=${shortname}&url=${url}&title=${id}`,
}}
javaScriptEnabled={true}
domStorageEnabled={true}
startInLoadingState={true}
originWhitelist={['*']}
mixedContentMode={'always'}
style={{ width: Dimensions.get('window').width - 15, marginTop: 35 }}
zoomable={false}
/>
);
};