From a954d6b6b88485dddc0ccfda634ffd102cb34ccd Mon Sep 17 00:00:00 2001 From: Ashm Walia <40498934+ashmgarv@users.noreply.github.com> Date: Tue, 22 Dec 2020 08:50:27 -0800 Subject: [TMA 446] Create category (#144) * Added welcome page * Working code * Small fix * Some more cleanup * Fixes * Cleanup * Fix again * Use gradient for white bg as well * Fixed type --- src/routes/onboarding/Onboarding.tsx | 44 +++++++++++++++++++++++++++++++ src/routes/onboarding/OnboardingStack.tsx | 17 +++++++++++- src/routes/profile/Profile.tsx | 12 +++++++++ src/routes/profile/ProfileStack.tsx | 6 ++++- 4 files changed, 77 insertions(+), 2 deletions(-) (limited to 'src/routes') diff --git a/src/routes/onboarding/Onboarding.tsx b/src/routes/onboarding/Onboarding.tsx index 63a75934..a3d281f5 100644 --- a/src/routes/onboarding/Onboarding.tsx +++ b/src/routes/onboarding/Onboarding.tsx @@ -12,8 +12,11 @@ import { SocialMedia, PasswordResetRequest, PasswordReset, + WelcomeScreen, + CategorySelection, } from '../../screens'; import {StackCardInterpolationProps} from '@react-navigation/stack'; +import TaggPopup from '../../components/common/TaggPopup'; const forFade = ({current}: StackCardInterpolationProps) => ({ cardStyle: { @@ -41,6 +44,47 @@ const Onboarding: React.FC = () => { gestureEnabled: false, }} /> + + + ({ + cardStyle: { + opacity: progress.interpolate({ + inputRange: [0, 0.5, 0.9, 1], + outputRange: [0, 0.25, 0.7, 1], + }), + }, + overlayStyle: { + backgroundColor: '#505050', + opacity: progress.interpolate({ + inputRange: [0, 1], + outputRange: [0, 0.9], + extrapolate: 'clamp', + }), + }, + }), + }} + /> ; + screenType: CategorySelectionScreenType; + user: UserType; + }; + TaggPopup: { + popupProps: TaggPopupType; + }; }; export const OnboardingStack = createStackNavigator(); diff --git a/src/routes/profile/Profile.tsx b/src/routes/profile/Profile.tsx index 3cb928e5..4c93b1ee 100644 --- a/src/routes/profile/Profile.tsx +++ b/src/routes/profile/Profile.tsx @@ -8,6 +8,7 @@ import { MomentCommentsScreen, FollowersListScreen, EditProfile, + CategorySelection, } from '../../screens'; import {ProfileStack, ProfileStackParams} from './ProfileStack'; import {RouteProp} from '@react-navigation/native'; @@ -90,6 +91,17 @@ const Profile: React.FC = ({route}) => { }} initialParams={{screenType}} /> + {isProfileStack ? ( ) : ( diff --git a/src/routes/profile/ProfileStack.tsx b/src/routes/profile/ProfileStack.tsx index e7db9f37..bc0a9560 100644 --- a/src/routes/profile/ProfileStack.tsx +++ b/src/routes/profile/ProfileStack.tsx @@ -2,7 +2,7 @@ * Note the name userXId here, it refers to the id of the user being visited */ import {createStackNavigator} from '@react-navigation/stack'; -import {MomentType, ScreenType} from '../../types'; +import {CategorySelectionScreenType, MomentType, ScreenType} from '../../types'; export type ProfileStackParams = { Search: { @@ -41,6 +41,10 @@ export type ProfileStackParams = { userId: string; username: string; }; + CategorySelection: { + categories: Array; + screenType: CategorySelectionScreenType; + }; }; export const ProfileStack = createStackNavigator(); -- cgit v1.2.3-70-g09d2