Skip to content

Commit

Permalink
feat(release): release to playstore (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
gajjartejas authored Sep 9, 2023
1 parent 1a906cd commit 2b8099b
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 117 deletions.
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ android {
applicationId "com.tejasgajjar.kano"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionCode 2
versionName "1.0"
}
signingConfigs {
Expand Down
12 changes: 8 additions & 4 deletions app/hooks/useLargeScreenMode.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
import { useEffect, useState } from 'react';

//App Modules
import { Dimensions } from 'react-native';
import { Dimensions, useWindowDimensions } from 'react-native';
import { isTablet } from 'react-native-device-info';

export const useIsLandscape = () => {
const { width, height } = useWindowDimensions();
return width > height;
};

const useLargeScreenMode = () => {
const [isLargeScreen, setIsLargeScreen] = useState(false);
const isLandscape = useIsLandscape();

useEffect(() => {
const checkScreenSize = () => {
const { width, height } = Dimensions.get('window');
const isLandscape = width > height;
setIsLargeScreen(isTablet() || isLandscape);
};

Expand All @@ -21,7 +25,7 @@ const useLargeScreenMode = () => {
return () => {
dimensionChangeListener.remove();
};
}, []);
}, [isLandscape]);

return isLargeScreen;
};
Expand Down
22 changes: 1 addition & 21 deletions app/navigation/NavigationStack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { Platform, StatusBar } from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import { Provider as PaperProvider } from 'react-native-paper';
import analytics from '@react-native-firebase/analytics';
import Toast from 'react-native-toast-message';

//Screens
Expand All @@ -27,9 +26,7 @@ const homeOptions: Object = {
};

const RootNavigation: React.FC = () => {
const routeNameRef = React.useRef<string | null>();
const navigationRef = React.useRef<any>();

const isDark = useThemeConfigStore(state => state.isDark);
const primary = useThemeConfigStore(state => state.primary);
const onPrimary = useThemeConfigStore(state => state.onPrimary);
Expand Down Expand Up @@ -72,24 +69,7 @@ const RootNavigation: React.FC = () => {

return (
<PaperProvider theme={theme}>
<NavigationContainer
ref={navigationRef}
onReady={() => {
routeNameRef.current = navigationRef.current!.getCurrentRoute().name;
}}
onStateChange={async () => {
const previousRouteName = routeNameRef.current;
const currentRouteName = navigationRef.current.getCurrentRoute().name;

if (previousRouteName !== currentRouteName) {
await analytics().logScreenView({
screen_name: currentRouteName,
screen_class: currentRouteName,
});
}
routeNameRef.current = currentRouteName;
}}
theme={theme}>
<NavigationContainer ref={navigationRef} theme={theme}>
<StatusBar
backgroundColor={'#FFFFFF01'}
barStyle={isDark ? 'light-content' : 'dark-content'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import Animated, { Easing, FadeIn, SlideInDown } from 'react-native-reanimated';
import useCardAnimationConfigStore from 'app/store/cardAnimationConfig';
import { easingSymbols } from 'app/config/extra-symbols';
import AppHeader from 'app/components/AppHeader';
import useLargeScreenMode from 'app/hooks/useLargeScreenMode';
import useLargeScreenMode, { useIsLandscape } from 'app/hooks/useLargeScreenMode';

//Params
type Props = NativeStackScreenProps<LoggedInTabNavigatorParams, 'LearnCharStrokeOrder'>;
Expand All @@ -31,6 +31,7 @@ const LearnCharStrokeOrder = ({ navigation, route }: Props) => {
const { width } = useWindowDimensions();
const { svgPath, color } = route.params;
const largeScreenMode = useLargeScreenMode();
const isLandscape = useIsLandscape();
const cellDim = largeScreenMode ? width * 0.3 : width * 0.6;

const [
Expand Down Expand Up @@ -84,11 +85,11 @@ const LearnCharStrokeOrder = ({ navigation, route }: Props) => {
/>

<Components.AppBaseView edges={['bottom', 'left', 'right']} style={styles.safeArea}>
<ScrollView horizontal={largeScreenMode}>
<ScrollView horizontal={largeScreenMode && isLandscape}>
<View style={[styles.contentContainer]}>
{!!svgPath && (
<Animated.View
style={[styles.contentContainer1, largeScreenMode && styles.tabContainer]}
style={[styles.contentContainer1, largeScreenMode && isLandscape && styles.tabContainer]}
entering={FadeIn.duration(600).easing(Easing.bezierFn(1, 0, 0.17, 0.98))}
layout={SlideInDown.duration(600).easing(Easing.bezierFn(1, 0, 0.17, 0.98))}>
{parsedSvg?.groups.map((g, gidx) => {
Expand All @@ -97,7 +98,7 @@ const LearnCharStrokeOrder = ({ navigation, route }: Props) => {
<View
style={[
styles.animatedCharContainer,
largeScreenMode && styles.animatedCharContainerTab,
largeScreenMode && isLandscape && styles.animatedCharContainerTab,
{ width: cellDim, height: cellDim },
]}
key={p.id + g.id}>
Expand Down
75 changes: 4 additions & 71 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,11 @@ PODS:
- React-Core (= 0.72.1)
- React-jsi (= 0.72.1)
- ReactCommon/turbomodule/core (= 0.72.1)
- Firebase/Analytics (10.11.0):
- Firebase/Core
- Firebase/Core (10.11.0):
- Firebase/CoreOnly
- FirebaseAnalytics (~> 10.11.0)
- Firebase/CoreOnly (10.11.0):
- FirebaseCore (= 10.11.0)
- Firebase/Crashlytics (10.11.0):
- Firebase/CoreOnly
- FirebaseCrashlytics (~> 10.11.0)
- FirebaseAnalytics (10.11.0):
- FirebaseAnalytics/AdIdSupport (= 10.11.0)
- FirebaseCore (~> 10.0)
- FirebaseInstallations (~> 10.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.11)
- GoogleUtilities/MethodSwizzler (~> 7.11)
- GoogleUtilities/Network (~> 7.11)
- "GoogleUtilities/NSData+zlib (~> 7.11)"
- nanopb (< 2.30910.0, >= 2.30908.0)
- FirebaseAnalytics/AdIdSupport (10.11.0):
- FirebaseCore (~> 10.0)
- FirebaseInstallations (~> 10.0)
- GoogleAppMeasurement (= 10.11.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.11)
- GoogleUtilities/MethodSwizzler (~> 7.11)
- GoogleUtilities/Network (~> 7.11)
- "GoogleUtilities/NSData+zlib (~> 7.11)"
- nanopb (< 2.30910.0, >= 2.30908.0)
- FirebaseCore (10.11.0):
- FirebaseCoreInternal (~> 10.0)
- GoogleUtilities/Environment (~> 7.8)
Expand All @@ -53,7 +30,7 @@ PODS:
- GoogleUtilities/Environment (~> 7.8)
- nanopb (< 2.30910.0, >= 2.30908.0)
- PromisesObjC (~> 2.1)
- FirebaseInstallations (10.11.0):
- FirebaseInstallations (10.12.0):
- FirebaseCore (~> 10.0)
- GoogleUtilities/Environment (~> 7.8)
- GoogleUtilities/UserDefaults (~> 7.8)
Expand All @@ -68,47 +45,15 @@ PODS:
- PromisesSwift (~> 2.1)
- fmt (6.2.1)
- glog (0.3.5)
- GoogleAppMeasurement (10.11.0):
- GoogleAppMeasurement/AdIdSupport (= 10.11.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.11)
- GoogleUtilities/MethodSwizzler (~> 7.11)
- GoogleUtilities/Network (~> 7.11)
- "GoogleUtilities/NSData+zlib (~> 7.11)"
- nanopb (< 2.30910.0, >= 2.30908.0)
- GoogleAppMeasurement/AdIdSupport (10.11.0):
- GoogleAppMeasurement/WithoutAdIdSupport (= 10.11.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.11)
- GoogleUtilities/MethodSwizzler (~> 7.11)
- GoogleUtilities/Network (~> 7.11)
- "GoogleUtilities/NSData+zlib (~> 7.11)"
- nanopb (< 2.30910.0, >= 2.30908.0)
- GoogleAppMeasurement/WithoutAdIdSupport (10.11.0):
- GoogleUtilities/AppDelegateSwizzler (~> 7.11)
- GoogleUtilities/MethodSwizzler (~> 7.11)
- GoogleUtilities/Network (~> 7.11)
- "GoogleUtilities/NSData+zlib (~> 7.11)"
- nanopb (< 2.30910.0, >= 2.30908.0)
- GoogleDataTransport (9.2.3):
- GoogleUtilities/Environment (~> 7.7)
- nanopb (< 2.30910.0, >= 2.30908.0)
- PromisesObjC (< 3.0, >= 1.2)
- GoogleUtilities/AppDelegateSwizzler (7.11.1):
- GoogleUtilities/Environment
- GoogleUtilities/Logger
- GoogleUtilities/Network
- GoogleUtilities/Environment (7.11.1):
- PromisesObjC (< 3.0, >= 1.2)
- GoogleUtilities/Logger (7.11.1):
- GoogleUtilities/Environment
- GoogleUtilities/MethodSwizzler (7.11.1):
- GoogleUtilities/Logger
- GoogleUtilities/Network (7.11.1):
- GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib"
- GoogleUtilities/Reachability
- "GoogleUtilities/NSData+zlib (7.11.1)"
- GoogleUtilities/Reachability (7.11.1):
- GoogleUtilities/Logger
- GoogleUtilities/UserDefaults (7.11.1):
- GoogleUtilities/Logger
- hermes-engine (0.72.1):
Expand Down Expand Up @@ -562,10 +507,6 @@ PODS:
- React-Core
- RNDeviceInfo (10.7.0):
- React-Core
- RNFBAnalytics (18.1.0):
- Firebase/Analytics (= 10.11.0)
- React-Core
- RNFBApp
- RNFBApp (18.1.0):
- Firebase/CoreOnly (= 10.11.0)
- React-Core
Expand Down Expand Up @@ -621,7 +562,7 @@ PODS:
- RNSound/Core (= 0.11.2)
- RNSound/Core (0.11.2):
- React-Core
- RNSVG (13.10.0):
- RNSVG (13.11.0):
- React-Core
- RNVectorIcons (10.0.0):
- React-Core
Expand Down Expand Up @@ -679,7 +620,6 @@ DEPENDENCIES:
- RNBootSplash (from `../node_modules/react-native-bootsplash`)
- "RNCAsyncStorage (from `../node_modules/@react-native-async-storage/async-storage`)"
- RNDeviceInfo (from `../node_modules/react-native-device-info`)
- "RNFBAnalytics (from `../node_modules/@react-native-firebase/analytics`)"
- "RNFBApp (from `../node_modules/@react-native-firebase/app`)"
- "RNFBCrashlytics (from `../node_modules/@react-native-firebase/crashlytics`)"
- "RNFlashList (from `../node_modules/@shopify/flash-list`)"
Expand All @@ -697,15 +637,13 @@ DEPENDENCIES:
SPEC REPOS:
trunk:
- Firebase
- FirebaseAnalytics
- FirebaseCore
- FirebaseCoreExtension
- FirebaseCoreInternal
- FirebaseCrashlytics
- FirebaseInstallations
- FirebaseSessions
- fmt
- GoogleAppMeasurement
- GoogleDataTransport
- GoogleUtilities
- libevent
Expand Down Expand Up @@ -815,8 +753,6 @@ EXTERNAL SOURCES:
:path: "../node_modules/@react-native-async-storage/async-storage"
RNDeviceInfo:
:path: "../node_modules/react-native-device-info"
RNFBAnalytics:
:path: "../node_modules/@react-native-firebase/analytics"
RNFBApp:
:path: "../node_modules/@react-native-firebase/app"
RNFBCrashlytics:
Expand Down Expand Up @@ -850,16 +786,14 @@ SPEC CHECKSUMS:
FBLazyVector: 55cd4593d570bd9e5e227488d637ce6a9581ce51
FBReactNativeSpec: 799b0e1a1561699cd0e424e24fe5624da38402f0
Firebase: 31d9575c124839fb5abc0db6d39511cc1dab1b85
FirebaseAnalytics: 6c6bf99e8854475bf1fa342028841be8ecd236da
FirebaseCore: 62fd4d549f5e3f3bd52b7998721c5fa0557fb355
FirebaseCoreExtension: cacdad57fdb60e0b86dcbcac058ec78237946759
FirebaseCoreInternal: 9e46c82a14a3b3a25be4e1e151ce6d21536b89c0
FirebaseCrashlytics: 5927efd92f7fb052b0ab1e673d2f0d97274cd442
FirebaseInstallations: 2a2c6859354cbec0a228a863d4daf6de7c74ced4
FirebaseInstallations: 7b99ef103f013624444c614397038219c45f8e63
FirebaseSessions: a62ba5c45284adb7714f4126cfbdb32b17c260bd
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b
GoogleAppMeasurement: d3dabccdb336fc0ae44b633c8abaa26559893cd9
GoogleDataTransport: f0308f5905a745f94fb91fea9c6cbaf3831cb1bd
GoogleUtilities: 9aa0ad5a7bc171f8bae016300bfcfa3fb8425749
hermes-engine: 9df83855a0fd15ef8eb61694652bae636b0c466e
Expand Down Expand Up @@ -912,7 +846,6 @@ SPEC CHECKSUMS:
RNBootSplash: 85f6b879c080e958afdb4c62ee04497b05fd7552
RNCAsyncStorage: 4b98ac3c64efa4e35c1197cb0c5ca5e9f5d4c666
RNDeviceInfo: 25d818c85db769cc0e7083d39efaa01a6f450df3
RNFBAnalytics: 4b4702721d096b024d2cabd522a5d7264f3afdbb
RNFBApp: fdbde65110240cd843e644270e974e9b455b0fc1
RNFBCrashlytics: b69333e28f4c100dbbf69be885f80288b75c8f13
RNFlashList: ade81b4e928ebd585dd492014d40fb8d0e848aab
Expand All @@ -923,7 +856,7 @@ SPEC CHECKSUMS:
RNReanimated: 9f7068e43b9358a46a688d94a5a3adb258139457
RNScreens: 50ffe2fa2342eabb2d0afbe19f7c1af286bc7fb3
RNSound: 6c156f925295bdc83e8e422e7d8b38d33bc71852
RNSVG: 80584470ff1ffc7994923ea135a3e5ad825546b9
RNSVG: 03e4d258ca355d7836a0a5dd4d4dc63c1eb49cbb
RNVectorIcons: 8b5bb0fa61d54cd2020af4f24a51841ce365c7e9
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
Yoga: 65286bb6a07edce5e4fe8c90774da977ae8fc009
Expand Down
15 changes: 0 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"dependencies": {
"@react-native-async-storage/async-storage": "^1.19.0",
"@react-native-community/slider": "^4.4.2",
"@react-native-firebase/analytics": "^18.1.0",
"@react-native-firebase/app": "^18.1.0",
"@react-native-firebase/crashlytics": "^18.1.0",
"@react-navigation/material-bottom-tabs": "^6.2.16",
Expand Down

0 comments on commit 2b8099b

Please sign in to comment.