From c1141b21026d59f7dd48f41979e5a7ad54725baf Mon Sep 17 00:00:00 2001 From: balzack Date: Fri, 16 Sep 2022 23:54:57 -0700 Subject: [PATCH] setting screens for small view --- app/mobile/ios/Podfile.lock | 6 +++ app/mobile/package.json | 2 + app/mobile/src/session/Session.jsx | 39 +++++++++++--- app/mobile/src/session/cards/Cards.jsx | 12 +++++ app/mobile/src/session/channels/Channels.jsx | 12 +++++ app/mobile/src/session/profile/Profile.jsx | 12 +++++ app/mobile/yarn.lock | 54 ++++++++++++++++++-- 7 files changed, 128 insertions(+), 9 deletions(-) create mode 100644 app/mobile/src/session/cards/Cards.jsx create mode 100644 app/mobile/src/session/channels/Channels.jsx create mode 100644 app/mobile/src/session/profile/Profile.jsx diff --git a/app/mobile/ios/Podfile.lock b/app/mobile/ios/Podfile.lock index 5345c0bb..94ec046b 100644 --- a/app/mobile/ios/Podfile.lock +++ b/app/mobile/ios/Podfile.lock @@ -312,6 +312,8 @@ PODS: - React-jsi (= 0.69.5) - React-logger (= 0.69.5) - React-perflogger (= 0.69.5) + - RNGestureHandler (2.6.1): + - React-Core - Yoga (1.14.0) DEPENDENCIES: @@ -357,6 +359,7 @@ DEPENDENCIES: - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`) - React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`) - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) + - RNGestureHandler (from `../node_modules/react-native-gesture-handler`) - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) SPEC REPOS: @@ -446,6 +449,8 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/ReactCommon/runtimeexecutor" ReactCommon: :path: "../node_modules/react-native/ReactCommon" + RNGestureHandler: + :path: "../node_modules/react-native-gesture-handler" Yoga: :path: "../node_modules/react-native/ReactCommon/yoga" @@ -492,6 +497,7 @@ SPEC CHECKSUMS: React-RCTVibration: 42b34fde72e42446d9b08d2b9a3ddc2fa9ac6189 React-runtimeexecutor: c778439c3c430a5719d027d3c67423b390a221fe ReactCommon: ab1003b81be740fecd82509c370a45b1a7dda0c1 + RNGestureHandler: 28ad20bf02257791f7f137b31beef34b9549f54b Yoga: c2b1f2494060865ac1f27e49639e72371b1205fa PODFILE CHECKSUM: df5a4d8901f42ad69df9f07100579df01b20e7e8 diff --git a/app/mobile/package.json b/app/mobile/package.json index a3193c70..496ebd5e 100644 --- a/app/mobile/package.json +++ b/app/mobile/package.json @@ -11,6 +11,7 @@ "dependencies": { "@react-navigation/bottom-tabs": "^6.4.0", "@react-navigation/native": "^6.0.13", + "@react-navigation/stack": "^6.3.0", "expo": "~46.0.9", "expo-splash-screen": "~0.16.2", "expo-status-bar": "~1.4.0", @@ -18,6 +19,7 @@ "react-dom": "18.0.0", "react-native": "0.69.5", "react-native-base64": "^0.2.1", + "react-native-gesture-handler": "^2.6.1", "react-native-safe-area-context": "^4.3.3", "react-native-safe-area-view": "^1.1.1", "react-native-sqlite-storage": "^6.0.1", diff --git a/app/mobile/src/session/Session.jsx b/app/mobile/src/session/Session.jsx index 83a25be6..8e4426f3 100644 --- a/app/mobile/src/session/Session.jsx +++ b/app/mobile/src/session/Session.jsx @@ -1,11 +1,15 @@ import { View, TouchableOpacity, Text } from 'react-native'; import { SafeAreaProvider, SafeAreaView } from 'react-native-safe-area-context'; import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'; +import { createStackNavigator } from '@react-navigation/stack'; import { NavigationContainer } from '@react-navigation/native'; import Ionicons from '@expo/vector-icons/AntDesign'; import { useSession } from './useSession.hook'; import { styles } from './Session.styled'; import Colors from 'constants/Colors'; +import { Profile } from './profile/Profile'; +import { Channels } from './channels/Channels'; +import { Cards } from './cards/Cards'; export function Session() { @@ -13,10 +17,32 @@ export function Session() { const Tab = createBottomTabNavigator(); - const Conversation = () => (LOGOUT); + const ConversationStack = createStackNavigator(); + const ConversationStackScreen = () => { + return ( + ({ headerShown: false })}> + + + ); + } - const Profile = () => (); - const Contacts = () => (); + const ProfileStack = createStackNavigator(); + const ProfileStackScreen = () => { + return ( + ({ headerShown: false })}> + + + ); + } + + const ContactStack = createStackNavigator(); + const ContactStackScreen = () => { + return ( + ({ headerShown: false })}> + + + ); + } return ( @@ -36,13 +62,14 @@ export function Session() { return ; } }, + tabBarShowLabel: false, tabBarActiveTintColor: Colors.white, tabBarInactiveTintColor: Colors.disabled, })} > - - - + + + diff --git a/app/mobile/src/session/cards/Cards.jsx b/app/mobile/src/session/cards/Cards.jsx new file mode 100644 index 00000000..2b15a767 --- /dev/null +++ b/app/mobile/src/session/cards/Cards.jsx @@ -0,0 +1,12 @@ +import { useContext } from 'react'; +import { View, TouchableOpacity, Text } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { AppContext } from 'context/AppContext'; + +export function Cards() { + + const app = useContext(AppContext); + + return (~ CARDS LOGOUT) +} + diff --git a/app/mobile/src/session/channels/Channels.jsx b/app/mobile/src/session/channels/Channels.jsx new file mode 100644 index 00000000..02a9089a --- /dev/null +++ b/app/mobile/src/session/channels/Channels.jsx @@ -0,0 +1,12 @@ +import { useContext } from 'react'; +import { View, TouchableOpacity, Text } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { AppContext } from 'context/AppContext'; + +export function Channels() { + + const app = useContext(AppContext); + + return (~ CHANNELS LOGOUT) +} + diff --git a/app/mobile/src/session/profile/Profile.jsx b/app/mobile/src/session/profile/Profile.jsx new file mode 100644 index 00000000..a44b957f --- /dev/null +++ b/app/mobile/src/session/profile/Profile.jsx @@ -0,0 +1,12 @@ +import { useContext } from 'react'; +import { View, TouchableOpacity, Text } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { AppContext } from 'context/AppContext'; + +export function Profile() { + + const app = useContext(AppContext); + + return (~ PROFILE LOGOUT) +} + diff --git a/app/mobile/yarn.lock b/app/mobile/yarn.lock index 7c2eb278..55cd1d37 100644 --- a/app/mobile/yarn.lock +++ b/app/mobile/yarn.lock @@ -1054,6 +1054,13 @@ "@babel/helper-validator-identifier" "^7.18.6" to-fast-properties "^2.0.0" +"@egjs/hammerjs@^2.0.17": + version "2.0.17" + resolved "https://registry.yarnpkg.com/@egjs/hammerjs/-/hammerjs-2.0.17.tgz#5dc02af75a6a06e4c2db0202cae38c9263895124" + integrity sha512-XQsZgjm2EcVUiZQf11UBJQfmZeEmOW8DpI1gsFeln6w0ae0ii4dMQEQ0kjl6DspdWX1aGY1/loyXnP0JS06e/A== + dependencies: + "@types/hammerjs" "^2.0.36" + "@expo/bunyan@4.0.0", "@expo/bunyan@^4.0.0": version "4.0.0" resolved "https://registry.npmjs.org/@expo/bunyan/-/bunyan-4.0.0.tgz" @@ -1725,6 +1732,15 @@ dependencies: nanoid "^3.1.23" +"@react-navigation/stack@^6.3.0": + version "6.3.0" + resolved "https://registry.yarnpkg.com/@react-navigation/stack/-/stack-6.3.0.tgz#3b268c5c61eba17fff1ed711e20ea94a9d5a1809" + integrity sha512-CCzdXkt57t3ikfV8TQIA7p4srf/o35ncT22ciGOAwZorB1M7Lqga18tsEqkk9R3qENl12a1Ei6VC7dkZezDXQQ== + dependencies: + "@react-navigation/elements" "^1.3.6" + color "^4.2.3" + warn-once "^0.1.0" + "@segment/loosely-validate-event@^2.0.0": version "2.0.0" resolved "https://registry.npmjs.org/@segment/loosely-validate-event/-/loosely-validate-event-2.0.0.tgz" @@ -1757,6 +1773,11 @@ dependencies: "@types/node" "*" +"@types/hammerjs@^2.0.36": + version "2.0.41" + resolved "https://registry.yarnpkg.com/@types/hammerjs/-/hammerjs-2.0.41.tgz#f6ecf57d1b12d2befcce00e928a6a097c22980aa" + integrity sha512-ewXv/ceBaJprikMcxCmWU1FKyMAQ2X7a9Gtmzw8fcg2kIePI1crERDM818W+XYrxqdBBOdlf2rm137bU+BltCA== + "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0": version "2.0.4" resolved "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz" @@ -3612,6 +3633,13 @@ hoist-non-react-statics@^2.3.1: resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz#c5903cf409c0dfd908f388e619d86b9c1174cb47" integrity sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw== +hoist-non-react-statics@^3.3.0: + version "3.3.2" + resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" + integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== + dependencies: + react-is "^16.7.0" + hosted-git-info@^3.0.2: version "3.0.8" resolved "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-3.0.8.tgz" @@ -4276,7 +4304,7 @@ lodash.throttle@^4.1.1: resolved "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz" integrity sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ== -lodash@^4.17.13, lodash@^4.17.15, lodash@^4.17.4: +lodash@^4.17.13, lodash@^4.17.15, lodash@^4.17.21, lodash@^4.17.4: version "4.17.21" resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -4305,7 +4333,7 @@ logkitty@^0.7.1: dayjs "^1.8.15" yargs "^15.1.0" -loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.3.1: +loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.3.1, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz" integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== @@ -5324,6 +5352,15 @@ prompts@^2.3.2, prompts@^2.4.0: kleur "^3.0.3" sisteransi "^1.0.5" +prop-types@^15.7.2: + version "15.8.1" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" + integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== + dependencies: + loose-envify "^1.4.0" + object-assign "^4.1.1" + react-is "^16.13.1" + pump@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz" @@ -5408,7 +5445,7 @@ react-dom@18.0.0: resolved "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz" integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== -react-is@^16.13.0: +react-is@^16.13.0, react-is@^16.13.1, react-is@^16.7.0: version "16.13.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== @@ -5433,6 +5470,17 @@ react-native-codegen@^0.69.2: jscodeshift "^0.13.1" nullthrows "^1.1.1" +react-native-gesture-handler@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/react-native-gesture-handler/-/react-native-gesture-handler-2.6.1.tgz#66c40c8d720eb4729b301836a40fd34d14ec840f" + integrity sha512-0MXjRgNCrsQJSo3B9oXORw5spdm/9dkDbP2JU/3zrVyV9/MnRz5Oo3oy7hREKYWVMF9Gk2UpsCquFLRFQxeSxQ== + dependencies: + "@egjs/hammerjs" "^2.0.17" + hoist-non-react-statics "^3.3.0" + invariant "^2.2.4" + lodash "^4.17.21" + prop-types "^15.7.2" + react-native-gradle-plugin@^0.0.7: version "0.0.7" resolved "https://registry.npmjs.org/react-native-gradle-plugin/-/react-native-gradle-plugin-0.0.7.tgz"