Browse Source

Clean up code styles

iou90 3 years ago
parent
commit
4d9560844c
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      demo/App.js

+ 3
- 3
demo/App.js View File

@@ -23,7 +23,7 @@ import {
23 23
   inlineBodyStyle,
24 24
 } from './config';
25 25
 
26
-const onShouldStartLoadWithRequest = result => {
26
+const onShouldStartLoadWithRequest = (result) => {
27 27
   console.log(result);
28 28
   return true;
29 29
 };
@@ -31,7 +31,7 @@ const onShouldStartLoadWithRequest = result => {
31 31
 const onError = ({nativeEvent}) =>
32 32
   console.error('WebView error: ', nativeEvent);
33 33
 
34
-const onMessage = event => {
34
+const onMessage = (event) => {
35 35
   const {data} = event.nativeEvent;
36 36
   let messageData;
37 37
   // maybe parse stringified JSON
@@ -44,7 +44,7 @@ const onMessage = event => {
44 44
     const {url} = messageData;
45 45
     // check if this message concerns us
46 46
     if (url && url.startsWith('http')) {
47
-      Linking.openURL(url).catch(error =>
47
+      Linking.openURL(url).catch((error) =>
48 48
         console.error('An error occurred', error),
49 49
       );
50 50
     }