aboutsummaryrefslogtreecommitdiff
path: root/src/screens/main/Home.tsx
diff options
context:
space:
mode:
authorHusam Salhab <47015061+hsalhab@users.noreply.github.com>2020-10-26 18:50:54 -0400
committerGitHub <noreply@github.com>2020-10-26 18:50:54 -0400
commitd48119be38e1dd3f0abc8a4b61c11aa4d0635810 (patch)
tree7d6553fb5d3a725c592955c3d3f8e217f9b9b6a4 /src/screens/main/Home.tsx
parent17fbfa29c1b78703b872221e3b590aca3ef5cf7e (diff)
[TMA-280] Add coming soon (#73)
* move async-storage * removed lock files * added lock files to gitignore * added the wrong file to gitignore * added coming soon screens * moved search next to profile * Added the right icons and abstracted cs to ComingSoon.tsx * Update Checkpoint.tsx Co-authored-by: Ashm Walia <ashmwalia@outlook.com>
Diffstat (limited to 'src/screens/main/Home.tsx')
-rw-r--r--src/screens/main/Home.tsx59
1 files changed, 2 insertions, 57 deletions
diff --git a/src/screens/main/Home.tsx b/src/screens/main/Home.tsx
index 7b6f1aaf..729a7a22 100644
--- a/src/screens/main/Home.tsx
+++ b/src/screens/main/Home.tsx
@@ -1,8 +1,5 @@
import React from 'react';
-import {StyleSheet, View, TouchableOpacity, Text} from 'react-native';
-import {GradientBackground, SocialMediaLinker} from '../../components';
-import {LinkerType} from 'src/types';
-import {SOCIAL_LIST} from '../../constants/';
+import {ComingSoon} from '../../components';
/**
* Home Screen for displaying Tagg post suggestions
@@ -10,59 +7,7 @@ import {SOCIAL_LIST} from '../../constants/';
*/
const Home: React.FC = () => {
- const linkers: Array<LinkerType> = [];
- const [state, setState] = React.useState({
- showMore: false,
- });
-
- let numSocials: Number = state.showMore ? 9 : 3;
-
- for (let i = 0; i < numSocials; i++) {
- let linker: LinkerType = {
- label: SOCIAL_LIST[i],
- };
- linkers.push(linker);
- }
-
- const handleShowPress = () => {
- setState({
- ...state,
- showMore: !state.showMore,
- });
- };
-
- return (
- <GradientBackground>
- <View style={styles.container}>
- {linkers.map((linker, index) => (
- <SocialMediaLinker key={index} social={linker} />
- ))}
- <TouchableOpacity onPress={handleShowPress} style={styles.show}>
- {state.showMore && <Text>Show Less 🔼</Text>}
- {!state.showMore && <Text>Show More 🔽</Text>}
- </TouchableOpacity>
- </View>
- </GradientBackground>
- );
+ return <ComingSoon />;
};
-const styles = StyleSheet.create({
- container: {
- flexDirection: 'row',
- height: '19%',
- flexWrap: 'wrap',
- justifyContent: 'center',
- alignContent: 'center',
- },
- show: {
- borderColor: '#fff',
- borderWidth: 1,
- borderRadius: 3,
- paddingHorizontal: '2%',
- paddingVertical: '1%',
- marginVertical: '3%',
- marginLeft: '65%',
- },
-});
-
export default Home;