aboutsummaryrefslogtreecommitdiff
path: root/src/components/common
diff options
context:
space:
mode:
authorAshm Walia <40498934+ashmgarv@users.noreply.github.com>2020-10-13 10:24:59 -0700
committerGitHub <noreply@github.com>2020-10-13 13:24:59 -0400
commit854a7d8f8526e8142c416ec41682468e87bcbbd2 (patch)
tree80493f0e697cc1b6d93e960fa2a0a6d5a4a91e95 /src/components/common
parent6e3fe33e5e1d3818ef8bb942c1544581ab8c0688 (diff)
[TMA - 238] Added invitation code verification screen as the first onboarding screen (#46)
* Added invitation code verification screen as the first onboarding screen * Changed screen order on some screens and a quick check on back navigation
Diffstat (limited to 'src/components/common')
-rw-r--r--src/components/common/LoadingIndicator.tsx24
-rw-r--r--src/components/common/index.ts1
2 files changed, 25 insertions, 0 deletions
diff --git a/src/components/common/LoadingIndicator.tsx b/src/components/common/LoadingIndicator.tsx
new file mode 100644
index 00000000..f6679556
--- /dev/null
+++ b/src/components/common/LoadingIndicator.tsx
@@ -0,0 +1,24 @@
+import React from 'react';
+import {ActivityIndicator, StyleSheet} from 'react-native';
+import {usePromiseTracker} from 'react-promise-tracker';
+
+const LoadingIndicator: React.FC = () => {
+ const {promiseInProgress} = usePromiseTracker();
+ return promiseInProgress ? (
+ <ActivityIndicator
+ style={styles.loadingIndicator}
+ size="large"
+ color="#fff"
+ />
+ ) : (
+ <></>
+ );
+};
+
+const styles = StyleSheet.create({
+ loadingIndicator: {
+ marginVertical: '5%',
+ },
+});
+
+export default LoadingIndicator;
diff --git a/src/components/common/index.ts b/src/components/common/index.ts
index 4a226c8f..cb9d641b 100644
--- a/src/components/common/index.ts
+++ b/src/components/common/index.ts
@@ -7,4 +7,5 @@ export {default as GradientBackground} from './GradientBackground';
export {default as SocialIcon} from './SocialIcon';
export {default as TabsGradient} from './TabsGradient';
export {default as RecentSearches} from '../search/RecentSearches';
+export {default as LoadingIndicator} from './LoadingIndicator';
export * from './post';