Skip to content

Commit

Permalink
chore: Update WebView source to use hosted URL for Daily To-Do App
Browse files Browse the repository at this point in the history
  • Loading branch information
SH20RAJ committed Jul 24, 2024
1 parent 98d1adc commit 04cac75
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions App.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import React from 'react';
import { StyleSheet, View } from 'react-native';
import { WebView } from 'react-native-webview';
import * as FileSystem from 'expo-file-system';

export default function App() {
const localUri = `${FileSystem.documentDirectory}index.html`;

return (
<View style={styles.container}>
<WebView source={{ uri: localUri }} style={{ flex: 1 }} />
<WebView source={{ uri: 'https://sh20raj.github.io/daily-todo-app/' }} style={{ flex: 1 }} />
</View>
);
}
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ <h1>Daily To-Do List</h1>
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('/service-worker.js')
navigator.serviceWorker.register('./service-worker.js')
.then(registration => {
console.log('Service Worker registered with scope:', registration.scope);
}, err => {
Expand Down

0 comments on commit 04cac75

Please sign in to comment.