forked from nomadcoders/prismagram-app
-
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.
nomadcoders#13.2 TabBar, Styles, Loader
- Loading branch information
1 parent
d29c9e3
commit 27e5200
Showing
9 changed files
with
61 additions
and
20 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
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,16 @@ | ||
import React from "react"; | ||
import { ActivityIndicator } from "react-native"; | ||
import styled from "styled-components"; | ||
import styles from "../styles"; | ||
|
||
const Container = styled.View` | ||
flex: 1; | ||
justify-content: center; | ||
align-items: center; | ||
`; | ||
|
||
export default () => ( | ||
<Container> | ||
<ActivityIndicator color={styles.blackColor} /> | ||
</Container> | ||
); |
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,14 +1,9 @@ | ||
import React from "react"; | ||
import { View } from "react-native"; | ||
import { useIsLoggedIn } from "../AuthContext"; | ||
import AuthNavigation from "../navigation/AuthNavigation"; | ||
import MainNavigation from "../navigation/MainNavigation"; | ||
|
||
export default () => { | ||
const isLoggedIn = useIsLoggedIn(); | ||
return ( | ||
<View style={{ flex: "1" }}> | ||
{isLoggedIn ? <MainNavigation /> : <AuthNavigation />} | ||
</View> | ||
); | ||
return isLoggedIn ? <MainNavigation /> : <AuthNavigation />; | ||
}; |
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,8 +1,18 @@ | ||
import { createStackNavigator } from "react-navigation"; | ||
import Messages from "../screens/Messages/Messages"; | ||
import Message from "../screens/Messages/Message"; | ||
import { stackStyles } from "./config"; | ||
|
||
export default createStackNavigator({ | ||
Messages, | ||
Message | ||
}); | ||
export default createStackNavigator( | ||
{ | ||
Messages, | ||
Message | ||
}, | ||
{ | ||
defaultNavigationOptions: { | ||
headerStyle: { | ||
...stackStyles | ||
} | ||
} | ||
} | ||
); |
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
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,3 @@ | ||
export const stackStyles = { | ||
backgroundColor: "#FAFAFA" | ||
}; |
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,16 +1,15 @@ | ||
import React from "react"; | ||
import styled from "styled-components"; | ||
import Loader from "../../components/Loader"; | ||
|
||
const View = styled.View` | ||
justify-content: center; | ||
align-items: center; | ||
flex: 1; | ||
`; | ||
|
||
const Text = styled.Text``; | ||
|
||
export default () => ( | ||
<View> | ||
<Text>Home</Text> | ||
<Loader /> | ||
</View> | ||
); |