-
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 branch 'almost-production' of https://github.com/100-Ascent/app …
…into production
- Loading branch information
Showing
85 changed files
with
5,790 additions
and
754 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
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
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,43 @@ | ||
import React from 'react' | ||
import { StyleSheet, TouchableOpacity, View } from 'react-native'; | ||
import Icon from 'react-native-elements/dist/icons/Icon'; | ||
import { Colors } from '../../utils/colors'; | ||
import Text12Bold from '../Text/Text12Bold'; | ||
|
||
interface Props{ | ||
text: string, | ||
onPress?: ()=> void, | ||
} | ||
|
||
const NotifyBanner: React.FC<Props> = ({ text, onPress }) => { | ||
|
||
//State variables | ||
|
||
//Async functions | ||
|
||
//Component functions | ||
|
||
return <View style={styles.emailNotVerifiedBanner}> | ||
<Icon name="warning" size={14} color="#E4252D" style={{marginRight: 5}} /> | ||
<TouchableOpacity onPress={onPress}> | ||
<Text12Bold text={text} textColor={Colors.TEXTDARK} textStyle={{textDecorationLine: 'underline'}} /> | ||
</TouchableOpacity> | ||
</View> | ||
} | ||
|
||
export default NotifyBanner; | ||
|
||
const styles = StyleSheet.create({ | ||
emailNotVerifiedBanner: { | ||
backgroundColor: '#F9EEA0', | ||
borderRadius: 5, | ||
width: '100%', | ||
marginBottom: 20, | ||
marginTop: -10, | ||
display: 'flex', | ||
flexDirection: 'row', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
padding: 7, | ||
} | ||
}) |
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,24 +1,35 @@ | ||
import {StyleSheet, TouchableOpacity, View} from 'react-native'; | ||
|
||
import { Colors } from '../../utils/colors'; | ||
import React from 'react'; | ||
import {TouchableOpacity, View} from 'react-native'; | ||
import ShareIcon from '../../../assets/icons/share-icon.svg'; | ||
import Text16Normal from '../Text/Text16Normal'; | ||
|
||
interface Props { | ||
shouldShowIcon?: boolean; | ||
onPress?: ()=> void; | ||
} | ||
|
||
const ShareButton = () => { | ||
const ShareButton: React.FC<Props> = ({ onPress, shouldShowIcon = true }) => { | ||
return ( | ||
<TouchableOpacity activeOpacity={0.8}> | ||
<View | ||
style={{ | ||
backgroundColor: '#111426', | ||
marginHorizontal: 5, | ||
paddingHorizontal: 5, | ||
paddingVertical: 11, | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
borderRadius: 10, | ||
}}> | ||
<ShareIcon /> | ||
<TouchableOpacity activeOpacity={0.8} onPress={onPress}> | ||
<View style={styles.button}> | ||
{ shouldShowIcon ? <ShareIcon /> : <Text16Normal text={"Share"} textColor={Colors.TEXT} /> } | ||
</View> | ||
</TouchableOpacity> | ||
); | ||
}; | ||
|
||
export default ShareButton; | ||
|
||
const styles = StyleSheet.create({ | ||
button : { | ||
backgroundColor: '#111426', | ||
marginHorizontal: 5, | ||
paddingHorizontal: 5, | ||
paddingVertical: 11, | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
borderRadius: 10, | ||
} | ||
}) |
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,34 @@ | ||
import React from 'react'; | ||
import {View} from 'react-native'; | ||
|
||
import CarousalCard from './CarousalCard'; | ||
import {Colors} from '../../../utils/colors'; | ||
|
||
const ActiveChallengeCard = ({data, onPress}) => { | ||
const allChallengeList = data.map((val, idx) => { | ||
return ( | ||
<View | ||
style={{ | ||
borderRadius: 10, | ||
backgroundColor: Colors.TRANSPARENT, | ||
flexDirection: 'row', | ||
marginTop: 15, | ||
}} | ||
key={idx}> | ||
<CarousalCard | ||
data={val} | ||
handleSubscribe={() => {}} | ||
isSubscribed={val.is_subscribed} | ||
onPress={() => onPress(val)} | ||
/> | ||
</View> | ||
); | ||
}); | ||
return ( | ||
<View style={{flex: 1, borderRadius: 10, marginTop: 10}}> | ||
<View style={{flex: 1}}>{allChallengeList}</View> | ||
</View> | ||
); | ||
}; | ||
|
||
export default ActiveChallengeCard; |
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,94 @@ | ||
import {StyleSheet, TouchableOpacity, View} from 'react-native'; | ||
|
||
import ChallengeDistanceMilestoneCity from './ChallengeDistanceMilestoneCity'; | ||
import {Colors} from '../../../utils/colors'; | ||
import { FONTS } from '../../../utils/constants/fonts'; | ||
import FastImage from 'react-native-fast-image'; | ||
import React from 'react'; | ||
import { SUBSCRIBE } from '../../../utils/constants/constants'; | ||
import StyledButton from '../../Button/StyledButton'; | ||
import Text24 from '../../Text/Text24'; | ||
|
||
interface Props { | ||
data: any; | ||
handleSubscribe?: (id: any) => void; | ||
isSubscribed?: boolean; | ||
onPress: () => void; | ||
} | ||
|
||
const CarousalCard: React.FC<Props> = ({ onPress, data, handleSubscribe, isSubscribed }) => { | ||
return ( | ||
<View style={styles.parentContainer}> | ||
<TouchableOpacity activeOpacity={0.8} onPress={onPress} style={{ paddingTop: 20}}> | ||
<View style={styles.container}> | ||
<View style={styles.imageContainer}> | ||
<FastImage | ||
style={styles.image} | ||
source={{ uri: data.icon, priority: FastImage.priority.high }} | ||
resizeMode={FastImage.resizeMode.cover} | ||
/> | ||
</View> | ||
<View style={styles.nameContainer}> | ||
<Text24 text={data.name} textStyle={FONTS.SEMIBOLD} /> | ||
<View style={styles.buttonContainer}> | ||
{ isSubscribed ? <View style={{ padding: 10 }} /> : | ||
<StyledButton | ||
text={SUBSCRIBE.toUpperCase()} | ||
onPress={() => handleSubscribe(data)} | ||
buttonStyle={{ marginVertical: 0, paddingVertical: 5 }} | ||
textStyle={{ paddingBottom: 2 }} | ||
/> | ||
} | ||
</View> | ||
</View> | ||
</View> | ||
|
||
<ChallengeDistanceMilestoneCity cities={data.cities} distance={data.distance} milestones={data.milestones} /> | ||
|
||
</TouchableOpacity> | ||
</View> | ||
); | ||
}; | ||
|
||
export default CarousalCard; | ||
|
||
|
||
const styles = StyleSheet.create({ | ||
parentContainer: { | ||
backgroundColor: Colors.TEXT, | ||
borderRadius: 10, | ||
margin: 1 | ||
}, | ||
container: { | ||
flexDirection: 'row', | ||
borderRadius: 10, | ||
}, | ||
imageContainer: { | ||
marginLeft: 20, | ||
borderWidth: 3, | ||
borderColor: Colors.BLACK2, | ||
borderRadius: 100, | ||
padding: 3 | ||
}, | ||
image: { | ||
width: 100, | ||
height: 100, | ||
borderRadius: 100, | ||
borderWidth: 0, | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
}, | ||
nameContainer: { | ||
width: '60%', | ||
flexDirection: 'column', | ||
paddingHorizontal: 20, | ||
}, | ||
buttonContainer: { | ||
marginTop: 10 | ||
}, | ||
challengeData: { | ||
width: "50%", | ||
flexDirection: 'row', | ||
paddingLeft: 20 | ||
} | ||
}) |
Oops, something went wrong.