mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-10 16:21:36 +00:00
Fix local reactjs
This commit is contained in:
parent
36a3110f74
commit
ad971836dd
@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { WebView, WebViewMessageEvent } from "react-native-webview";
|
import { WebView, WebViewMessageEvent } from "react-native-webview";
|
||||||
import {SafeAreaView, Text} from 'react-native';
|
import {SafeAreaView, Text, Platform} from 'react-native';
|
||||||
// import Tor from "react-native-tor";
|
// import Tor from "react-native-tor";
|
||||||
|
|
||||||
// Initialize the module
|
// Initialize the module
|
||||||
@ -22,14 +22,15 @@ import {SafeAreaView, Text} from 'react-native';
|
|||||||
const App = () => {
|
const App = () => {
|
||||||
// Webview with local html/js in a single location for andrid/iOS
|
// Webview with local html/js in a single location for andrid/iOS
|
||||||
// https://yelotofu.com/react-native-load-local-static-site-inside-webview-2b93eb1c4225
|
// https://yelotofu.com/react-native-load-local-static-site-inside-webview-2b93eb1c4225
|
||||||
const htmlPath = "file:///android_asset/Web.bundle/index.html";
|
const htmlPath = (Platform.OS === 'android' ? 'file:///android_asset/' : '') + 'Web.bundle/index.html?';
|
||||||
const uri = 'https://robosats.onion.moe'
|
const uri = 'https://robosats.onion.moe'
|
||||||
const onion = 'http://robosats6tkf3eva7x2voqso3a5wcorsnw34jveyxfqi2fu7oyheasid.onion'
|
const onion = 'http://robosats6tkf3eva7x2voqso3a5wcorsnw34jveyxfqi2fu7oyheasid.onion'
|
||||||
return (
|
return (
|
||||||
<SafeAreaView style={{ flex: 1 }}>
|
<SafeAreaView style={{ flex: 1 }}>
|
||||||
<WebView
|
<WebView
|
||||||
source={{
|
source={{
|
||||||
uri: 'uri',
|
uri: uri,
|
||||||
|
//baseUrl: uri,
|
||||||
}}
|
}}
|
||||||
javaScriptEnabled={true}
|
javaScriptEnabled={true}
|
||||||
domStorageEnabled={true}
|
domStorageEnabled={true}
|
||||||
|
Loading…
Reference in New Issue
Block a user