Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cola119 committed Jul 2, 2019
1 parent e1fed56 commit c641912
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ ReactDOM.render(
<CssBaseline />
<Route path="/" exact={true} component={App} />
<Route
path="/login"
path="/lineLogin"
exact={true}
render={renderLoginForm('https://fe31b056.ngrok.io/trecamp-server/us-central1/api/login')}
render={renderLoginForm('https://b1b22f9c.ngrok.io/trecamp-server/us-central1/api/lineLogin')}
/>
<Route
path="/login_production"
exact={true}
render={renderLoginForm('https://trecamp-server.web.app/login')}
render={renderLoginForm('https://trecamp-server.web.app/lineLogin')}
/>
</Router>,
document.getElementById('root')
Expand Down
8 changes: 2 additions & 6 deletions src/serviceWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ const isLocalhost = Boolean(
// [::1] is the IPv6 localhost address.
window.location.hostname === '[::1]' ||
// 127.0.0.1/8 is considered localhost for IPv4.
window.location.hostname.match(
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
)
window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)
);

type Config = {
Expand Down Expand Up @@ -128,9 +126,7 @@ function checkValidServiceWorker(swUrl: string, config?: Config) {
}
})
.catch(() => {
console.log(
'No internet connection found. App is running in offline mode.'
);
console.log('No internet connection found. App is running in offline mode.');
});
}

Expand Down

0 comments on commit c641912

Please sign in to comment.