From 0f332655d2b64700623f25912d2610517fb954b6 Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Wed, 7 Oct 2020 20:17:13 -0400 Subject: [TMA-186] Instagram Taggs - Frontend (#45) * Renamed Moments(Bar) to Taggs(Bar) * created initial navigation and empty social media taggs screen * made more progress for the header styling * Finished social media taggs screen, organized code structure * linted stuff D: * moved bar height utility function to utils * moved color constants to constants * moved avatar title * updated comments for social media taggs * NOW the file is there --- src/routes/index.ts | 1 + src/routes/profile/Profile.tsx | 31 +++++++++++++++++++++++++++++++ src/routes/profile/ProfileStack.tsx | 11 +++++++++++ src/routes/profile/index.ts | 2 ++ src/routes/tabs/NavigationBar.tsx | 13 ++++--------- 5 files changed, 49 insertions(+), 9 deletions(-) create mode 100644 src/routes/profile/Profile.tsx create mode 100644 src/routes/profile/ProfileStack.tsx create mode 100644 src/routes/profile/index.ts (limited to 'src/routes') diff --git a/src/routes/index.ts b/src/routes/index.ts index 69697b20..c06845aa 100644 --- a/src/routes/index.ts +++ b/src/routes/index.ts @@ -1,4 +1,5 @@ export {default as AuthProvider} from './authentication'; export * from './authentication'; export * from './onboarding'; +export * from './profile'; export {default} from './Routes'; diff --git a/src/routes/profile/Profile.tsx b/src/routes/profile/Profile.tsx new file mode 100644 index 00000000..faab0bde --- /dev/null +++ b/src/routes/profile/Profile.tsx @@ -0,0 +1,31 @@ +import React from 'react'; +import {Image, StyleSheet} from 'react-native'; +import LinearGradient from 'react-native-linear-gradient'; +import {AvatarTitle} from '../../components'; +import {AVATAR_DIM, TAGGS_GRADIENT} from '../../constants'; +import {ProfileScreen, SocialMediaTaggs} from '../../screens'; +import {AuthContext} from '../authentication'; +import {ProfileStack} from './ProfileStack'; + +const Profile: React.FC = () => { + return ( + + + , + }} + /> + + ); +}; + +export default Profile; diff --git a/src/routes/profile/ProfileStack.tsx b/src/routes/profile/ProfileStack.tsx new file mode 100644 index 00000000..9a39aa97 --- /dev/null +++ b/src/routes/profile/ProfileStack.tsx @@ -0,0 +1,11 @@ +import {createStackNavigator} from '@react-navigation/stack'; + +export type ProfileStackParams = { + Profile: undefined; + SocialMediaTaggs: { + socialMediaType: string; + socialMediaHandle: string; + }; +}; + +export const ProfileStack = createStackNavigator(); diff --git a/src/routes/profile/index.ts b/src/routes/profile/index.ts new file mode 100644 index 00000000..367f4cc6 --- /dev/null +++ b/src/routes/profile/index.ts @@ -0,0 +1,2 @@ +export * from './ProfileStack'; +export {default} from './Profile'; diff --git a/src/routes/tabs/NavigationBar.tsx b/src/routes/tabs/NavigationBar.tsx index d36b02ae..456e923f 100644 --- a/src/routes/tabs/NavigationBar.tsx +++ b/src/routes/tabs/NavigationBar.tsx @@ -1,13 +1,8 @@ -import React from 'react'; import {createBottomTabNavigator} from '@react-navigation/bottom-tabs'; +import React from 'react'; import {NavigationIcon} from '../../components'; -import { - ProfileScreen, - SearchScreen, - Home, - Notifications, - Upload, -} from '../../screens'; +import {Home, Notifications, SearchScreen, Upload} from '../../screens'; +import Profile from '../profile'; const Tabs = createBottomTabNavigator(); @@ -65,7 +60,7 @@ const NavigationBar: React.FC = () => { - + ); }; -- cgit v1.2.3-70-g09d2