-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from HASH-SQUAD/develop
Develop
- Loading branch information
Showing
25 changed files
with
1,234 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,7 @@ yarn-error.* | |
|
||
# local env files | ||
.env*.local | ||
.env | ||
|
||
# typescript | ||
*.tsbuildinfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,14 @@ | ||
module.exports = function(api) { | ||
api.cache(true); | ||
return { | ||
presets: ['babel-preset-expo'], | ||
}; | ||
api.cache(true); | ||
return { | ||
presets: ['babel-preset-expo'], | ||
plugins: [ | ||
[ | ||
'module:react-native-dotenv', | ||
{ | ||
moduleName: 'react-native-dotenv', | ||
}, | ||
], | ||
], | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import React from 'react'; | ||
import { NavigationContainer } from '@react-navigation/native'; | ||
import StackNavigation from './navigations/index'; | ||
|
||
const App = () => { | ||
return ( | ||
<NavigationContainer> | ||
<StackNavigation /> | ||
</NavigationContainer> | ||
); | ||
}; | ||
|
||
export default App; |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React from 'react'; | ||
import { createStackNavigator } from '@react-navigation/stack'; | ||
import Auth from '../screens/auth/index'; | ||
|
||
const Stack = createStackNavigator(); | ||
|
||
const StackNavigation = () => { | ||
return ( | ||
<Stack.Navigator> | ||
<Stack.Screen | ||
name="auth" | ||
component={Auth} | ||
options={{ headerShown: false }} | ||
/> | ||
</Stack.Navigator> | ||
); | ||
}; | ||
|
||
export default StackNavigation; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import React, { useEffect, useRef, useState } from 'react'; | ||
import { WebView } from 'react-native-webview'; | ||
import { StyleSheet, StatusBar, View } from 'react-native'; | ||
import Constants from 'expo-constants'; | ||
import { SafeAreaView } from 'react-native-safe-area-context'; | ||
|
||
export default function App(): React.ReactElement { | ||
const statusBarHeight: number = Constants.statusBarHeight; | ||
const webViewRef = useRef<WebView>(null); | ||
const [isAuthPage, setIsAuthPage] = useState(false); | ||
|
||
const handleWebViewLoad = () => { | ||
webViewRef.current?.postMessage(statusBarHeight.toString()); | ||
}; | ||
|
||
const handleNavigationStateChange = (navState: any) => { | ||
const currentUrl = navState.url; | ||
setIsAuthPage(currentUrl.includes('/auth')); | ||
}; | ||
|
||
useEffect(() => { | ||
if (webViewRef.current) { | ||
webViewRef.current.postMessage(statusBarHeight.toString()); | ||
} | ||
}, [statusBarHeight]); | ||
|
||
return ( | ||
<> | ||
<StatusBar | ||
backgroundColor={isAuthPage ? 'transparent' : 'white'} | ||
barStyle='dark-content' | ||
translucent={isAuthPage} | ||
/> | ||
<SafeAreaView style={styles.safeArea}> | ||
<View | ||
style={[ | ||
styles.container, | ||
{ marginTop: isAuthPage ? 0 : Constants.statusBarHeight }, | ||
]} | ||
> | ||
<WebView | ||
style={styles.webView} | ||
source={{ uri: 'https://harp-frontend.netlify.app/splash' }} | ||
ref={webViewRef} | ||
onLoad={handleWebViewLoad} | ||
onNavigationStateChange={handleNavigationStateChange} | ||
/> | ||
</View> | ||
</SafeAreaView> | ||
</> | ||
); | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
safeArea: { | ||
flex: 1, | ||
backgroundColor: 'white', | ||
}, | ||
container: { | ||
flex: 1, | ||
}, | ||
webView: { | ||
flex: 1, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import React, { useEffect, useRef, useState } from 'react'; | ||
import { WebView } from 'react-native-webview'; | ||
import { StyleSheet, StatusBar, View } from 'react-native'; | ||
import Constants from 'expo-constants'; | ||
import { SafeAreaView } from 'react-native-safe-area-context'; | ||
|
||
export default function App(): React.ReactElement { | ||
const statusBarHeight: number = Constants.statusBarHeight; | ||
const webViewRef = useRef<WebView>(null); | ||
const [isAuthPage, setIsAuthPage] = useState(false); | ||
|
||
const handleWebViewLoad = () => { | ||
webViewRef.current?.postMessage(statusBarHeight.toString()); | ||
}; | ||
|
||
const handleNavigationStateChange = (navState: any) => { | ||
const currentUrl = navState.url; | ||
setIsAuthPage(currentUrl.includes('/auth')); | ||
}; | ||
|
||
useEffect(() => { | ||
if (webViewRef.current) { | ||
webViewRef.current.postMessage(statusBarHeight.toString()); | ||
} | ||
}, [statusBarHeight]); | ||
|
||
return ( | ||
<> | ||
<StatusBar | ||
backgroundColor={isAuthPage ? 'transparent' : 'white'} | ||
barStyle='dark-content' | ||
translucent={isAuthPage} | ||
/> | ||
<SafeAreaView style={styles.safeArea}> | ||
<View | ||
style={[ | ||
styles.container, | ||
{ marginTop: isAuthPage ? 0 : Constants.statusBarHeight }, | ||
]} | ||
> | ||
<WebView | ||
style={styles.webView} | ||
source={{ uri: 'https://harp-frontend.netlify.app/' }} | ||
ref={webViewRef} | ||
onLoad={handleWebViewLoad} | ||
onNavigationStateChange={handleNavigationStateChange} | ||
/> | ||
</View> | ||
</SafeAreaView> | ||
</> | ||
); | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
safeArea: { | ||
flex: 1, | ||
backgroundColor: 'white', | ||
}, | ||
container: { | ||
flex: 1, | ||
}, | ||
webView: { | ||
flex: 1, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import React, { useEffect, useRef, useState } from 'react'; | ||
import { WebView } from 'react-native-webview'; | ||
import { StyleSheet, StatusBar, View } from 'react-native'; | ||
import Constants from 'expo-constants'; | ||
import { SafeAreaView } from 'react-native-safe-area-context'; | ||
|
||
export default function App(): React.ReactElement { | ||
const statusBarHeight: number = Constants.statusBarHeight; | ||
const webViewRef = useRef<WebView>(null); | ||
const [isAuthPage, setIsAuthPage] = useState(false); | ||
|
||
const handleWebViewLoad = () => { | ||
webViewRef.current?.postMessage(statusBarHeight.toString()); | ||
}; | ||
|
||
const handleNavigationStateChange = (navState: any) => { | ||
const currentUrl = navState.url; | ||
setIsAuthPage(currentUrl.includes('/auth')); | ||
}; | ||
|
||
useEffect(() => { | ||
if (webViewRef.current) { | ||
webViewRef.current.postMessage(statusBarHeight.toString()); | ||
} | ||
}, [statusBarHeight]); | ||
|
||
return ( | ||
<> | ||
<StatusBar | ||
backgroundColor={isAuthPage ? 'transparent' : 'white'} | ||
barStyle='dark-content' | ||
translucent={isAuthPage} | ||
/> | ||
<SafeAreaView style={styles.safeArea}> | ||
<View | ||
style={[ | ||
styles.container, | ||
{ marginTop: isAuthPage ? 0 : Constants.statusBarHeight }, | ||
]} | ||
> | ||
<WebView | ||
style={styles.webView} | ||
source={{ uri: 'https://harp-frontend.netlify.app/asldfjasjdf' }} | ||
ref={webViewRef} | ||
onLoad={handleWebViewLoad} | ||
onNavigationStateChange={handleNavigationStateChange} | ||
/> | ||
</View> | ||
</SafeAreaView> | ||
</> | ||
); | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
safeArea: { | ||
flex: 1, | ||
backgroundColor: 'white', | ||
}, | ||
container: { | ||
flex: 1, | ||
}, | ||
webView: { | ||
flex: 1, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import React, { useEffect, useRef, useState } from 'react'; | ||
import { WebView } from 'react-native-webview'; | ||
import { StyleSheet, StatusBar, View } from 'react-native'; | ||
import Constants from 'expo-constants'; | ||
import { SafeAreaView } from 'react-native-safe-area-context'; | ||
|
||
export default function App(): React.ReactElement { | ||
const statusBarHeight: number = Constants.statusBarHeight; | ||
const webViewRef = useRef<WebView>(null); | ||
const [isAuthPage, setIsAuthPage] = useState(false); | ||
|
||
const handleWebViewLoad = () => { | ||
webViewRef.current?.postMessage(statusBarHeight.toString()); | ||
}; | ||
|
||
const handleNavigationStateChange = (navState: any) => { | ||
const currentUrl = navState.url; | ||
setIsAuthPage(currentUrl.includes('/auth')); | ||
}; | ||
|
||
useEffect(() => { | ||
if (webViewRef.current) { | ||
webViewRef.current.postMessage(statusBarHeight.toString()); | ||
} | ||
}, [statusBarHeight]); | ||
|
||
return ( | ||
<> | ||
<StatusBar | ||
backgroundColor={isAuthPage ? 'transparent' : 'white'} | ||
barStyle='dark-content' | ||
translucent={isAuthPage} | ||
/> | ||
<SafeAreaView style={styles.safeArea}> | ||
<View | ||
style={[ | ||
styles.container, | ||
{ marginTop: isAuthPage ? 0 : Constants.statusBarHeight }, | ||
]} | ||
> | ||
<WebView | ||
style={styles.webView} | ||
source={{ | ||
uri: 'https://harp-frontend.netlify.app/profile/edit/crop', | ||
}} | ||
ref={webViewRef} | ||
onLoad={handleWebViewLoad} | ||
onNavigationStateChange={handleNavigationStateChange} | ||
/> | ||
</View> | ||
</SafeAreaView> | ||
</> | ||
); | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
safeArea: { | ||
flex: 1, | ||
backgroundColor: 'white', | ||
}, | ||
container: { | ||
flex: 1, | ||
}, | ||
webView: { | ||
flex: 1, | ||
}, | ||
}); |
Oops, something went wrong.