Skip to content

Commit

Permalink
Merge branch 'almost-production' of https://github.com/100-Ascent/app
Browse files Browse the repository at this point in the history
…into production
  • Loading branch information
neontvn committed Mar 23, 2022
2 parents d91cd0b + c711f15 commit e50214c
Show file tree
Hide file tree
Showing 85 changed files with 5,790 additions and 754 deletions.
9 changes: 7 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,11 @@ android {
}
defaultConfig {
applicationId "com.tym.tym_100ascent"
multiDexEnabled true
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 11
versionName "1.4.2"
versionCode 12
versionName "1.5.0"
vectorDrawables.useSupportLibrary = true
manifestPlaceholders = [
appAuthRedirectScheme: 'com.googleusercontent.apps.730727502414-urev3kc18jh61qc41r3slea7pkltmvk5'
Expand Down Expand Up @@ -209,6 +210,10 @@ dependencies {
implementation platform('com.google.firebase:firebase-bom:28.2.1')
implementation 'com.google.firebase:firebase-analytics'
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
implementation 'com.android.support:multidex:2.0.1'
implementation "com.squareup.okhttp3:okhttp:4.2.1"
implementation "com.squareup.okhttp3:logging-interceptor:4.2.1"
implementation "com.squareup.okhttp3:okhttp-urlconnection:4.2.1"

debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
exclude group:'com.facebook.fbjni'
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ allprojects {
url("$rootDir/../node_modules/jsc-android/dist")
}
maven { url 'https://maven.google.com' }

maven { url "https://artifactory.paytm.in/libs-release-local" }
google()
jcenter()
maven { url 'https://www.jitpack.io' }
Expand Down
3 changes: 2 additions & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
org.gradle.jvmargs=-Xmx4608m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8s


# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
Expand Down
8 changes: 4 additions & 4 deletions ios/TYM_100Ascent.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@
CODE_SIGN_ENTITLEMENTS = TYM_100Ascent/TYM_100Ascent.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5;
CURRENT_PROJECT_VERSION = 6;
DEVELOPMENT_TEAM = X93R6X6W32;
ENABLE_BITCODE = NO;
EXCLUDED_ARCHS = "";
Expand All @@ -601,7 +601,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.4.1;
MARKETING_VERSION = 1.4.2;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand All @@ -626,14 +626,14 @@
CODE_SIGN_ENTITLEMENTS = TYM_100Ascent/TYM_100Ascent.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5;
CURRENT_PROJECT_VERSION = 6;
DEVELOPMENT_TEAM = X93R6X6W32;
INFOPLIST_FILE = TYM_100Ascent/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.4.1;
MARKETING_VERSION = 1.4.2;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"lottie-ios": "^3.2.3",
"lottie-react-native": "^4.0.3",
"moment": "^2.29.1",
"paytm_allinone_react-native": "^1.1.0",
"react": "17.0.1",
"react-native": "0.64.1",
"react-native-app-auth": "^6.4.0",
Expand Down
43 changes: 43 additions & 0 deletions src/components/Banners/NotifyBanner.tsx
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,
}
})
8 changes: 4 additions & 4 deletions src/components/Button/CustomTabBarButton.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import {Colors} from '../../utils/colors';
import React from 'react';
import {View} from 'react-native';
import {TouchableOpacity} from 'react-native';
import {Colors} from '../../utils/colors';
import {View} from 'react-native';

const CustomTabBarButton = ({onPress, children, isKeyboardVisible}) => {
const CustomTabBarButton = ({onPress, children, showTabBarButton}) => {
return (
<TouchableOpacity
activeOpacity={1}
onPress={onPress}
style={{
justifyContent: 'center',
alignItems: 'center',
marginBottom: isKeyboardVisible ? -10 : 30,
marginBottom: showTabBarButton ? 30 : -10,
}}>
<View
style={{
Expand Down
39 changes: 25 additions & 14 deletions src/components/Button/ShareButton.tsx
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,
}
})
1 change: 0 additions & 1 deletion src/components/Button/SpotifyButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const SpotifyButton = ({onPress}) => {
<View
style={{
backgroundColor: '#111426',
marginHorizontal: 5,
padding: 9,
justifyContent: 'center',
alignItems: 'center',
Expand Down
10 changes: 6 additions & 4 deletions src/components/Button/StyledButton.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import React from 'react';
import {ActivityIndicator, ViewStyle} from 'react-native';
import {TouchableOpacity, View} from 'react-native';
import { Icon } from 'react-native-elements/dist/icons/Icon';

import {Colors} from '../../utils/colors';
import { Icon } from 'react-native-elements/dist/icons/Icon';
import React from 'react';
import Text16Normal from '../Text/Text16Normal';

interface Props {
onPress: () => void;
text: string;
buttonStyle?: ViewStyle;
buttonStyle?: any;
textStyle?: any;
disabled?: boolean;
loading?: boolean;
Expand Down Expand Up @@ -39,7 +40,8 @@ const StyledButton: React.FC<Props> = ({
},
buttonStyle,
]}>
{loading ? <ActivityIndicator size="small" color={Colors.TEXT} /> : <Text16Normal
{loading ? <ActivityIndicator size="small" color={Colors.TEXT} /> :
<Text16Normal
text={text}
textColor={Colors.TEXT}
textStyle={textStyle}
Expand Down
34 changes: 34 additions & 0 deletions src/components/Cards/Challenges/ActiveChallenge.tsx
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;
94 changes: 94 additions & 0 deletions src/components/Cards/Challenges/CarousalCard.tsx
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
}
})
Loading

0 comments on commit e50214c

Please sign in to comment.