Skip to content

Commit

Permalink
chore: rebase adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
LazyAfternoons committed Nov 20, 2023
1 parent b9ec214 commit f609f1b
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,6 @@ exports[`OperationResultScreenContent should match the snapshot with default pro
"overflow": "hidden",
},
false,
false,
Object {
"height": 40,
},
Expand Down
16 changes: 13 additions & 3 deletions ts/features/barcode/screens/BarcodeScanScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Divider, ListItemNav, VSpacer } from "@pagopa/io-app-design-system";
import { useNavigation } from "@react-navigation/native";
import { CommonActions, useNavigation } from "@react-navigation/native";
import React from "react";
import { Alert, View } from "react-native";
import ReactNativeHapticFeedback, {
Expand Down Expand Up @@ -38,7 +38,8 @@ import {
} from "../types/IOBarcode";
import { BarcodeFailure } from "../types/failure";
import { getIOBarcodesByType } from "../utils/getBarcodesByType";
import { itWalletEnabled } from "../../../config";
import NavigationService from "../../../navigation/NavigationService";
import { ITW_ROUTES } from "../../it-wallet/navigation/ItwRoutes";

const BarcodeScanScreen = () => {
const navigation = useNavigation<IOStackNavigationProp<AppParamsList>>();
Expand Down Expand Up @@ -139,7 +140,16 @@ const BarcodeScanScreen = () => {
openDeepLink(barcode.authUrl);
break;
case "ITWALLET":
// TODO: blocked by [SIW-272]
const params = {
authReqUrl: barcode.requestUri,
clientId: barcode.clientId
};
NavigationService.dispatchNavigationAction(
CommonActions.navigate(ITW_ROUTES.MAIN, {
screen: ITW_ROUTES.PRESENTATION.CROSS_DEVICE.INIT,
params
})
);
break;
}
};
Expand Down
4 changes: 2 additions & 2 deletions ts/features/it-wallet/components/design/BadgeButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import Animated, {
import {
IOScaleValues,
IOSpringValues,
Badge
Badge,
IOButtonStyles
} from "@pagopa/io-app-design-system";
import { WithTestID } from "../../../../types/WithTestID";
import { IOButtonStyles } from "../../../../components/core/variables/IOStyles";

export type BadgeButton = WithTestID<
{
Expand Down
7 changes: 1 addition & 6 deletions ts/navigation/AppStackNavigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@ import { LinkingOptions, NavigationContainer } from "@react-navigation/native";
import * as React from "react";
import { useRef } from "react";
import { View } from "react-native";
import {
IOColors,
IOThemeDark,
IOThemeLight,
useIOExperimentalDesign
} from "@pagopa/io-app-design-system";
import { useIOExperimentalDesign } from "@pagopa/io-app-design-system";
import LoadingSpinnerOverlay from "../components/LoadingSpinnerOverlay";
import {
bpdEnabled,
Expand Down
2 changes: 0 additions & 2 deletions ts/navigation/AuthenticatedStackNavigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ import {
isIdPayEnabledSelector
} from "../store/reducers/backendStatus";
import { isGestureEnabled } from "../utils/navigation";
import { IdPayCodeRoutes } from "../features/idpay/code/navigation/routes";
import { IdPayCodeNavigator } from "../features/idpay/code/navigation/navigator";
import { ItwStackNavigator } from "../features/it-wallet/navigation/ItwStackNavigator";
import { ITW_ROUTES } from "../features/it-wallet/navigation/ItwRoutes";
import { MessagesStackNavigator } from "./MessagesNavigator";
Expand Down
3 changes: 3 additions & 0 deletions ts/navigation/ProfileNavigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ const ProfileStackNavigator = () => {
name={ROUTES.PROFILE_MAIN}
component={ProfileMainScreen}
initialParams={{ hasBackButton: true }}
options={{
headerShown: false
}}
/>
<Stack.Screen
options={{
Expand Down
27 changes: 1 addition & 26 deletions ts/navigation/TabNavigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import * as React from "react";
import { StyleSheet } from "react-native";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import { IOColors } from "@pagopa/io-app-design-system";
import { useNavigation } from "@react-navigation/native";
import { makeFontStyleObject } from "../components/core/fonts";
import LoadingSpinnerOverlay from "../components/LoadingSpinnerOverlay";
import { TabIconComponent } from "../components/ui/TabIconComponent";
Expand All @@ -18,7 +17,6 @@ import { StartupStatusEnum, isStartupLoaded } from "../store/reducers/startup";
import variables from "../theme/variables";
import { itWalletEnabled } from "../config";
import ItwHomeScreen from "../features/it-wallet/screens/ItwHomeScreen";
import { AppParamsList, IOStackNavigationProp } from "./params/AppParamsList";
import { MainTabParamsList } from "./params/MainTabParamsList";
import ROUTES from "./routes";
import { AppParamsList, IOStackNavigationProp } from "./params/AppParamsList";
Expand Down Expand Up @@ -121,7 +119,7 @@ export const MainTabNavigator = () => {
}}
/>
)}
{itWalletEnabled && (
{isDesignSystemEnabled && (
<Tab.Screen
name={ROUTES.BARCODE_SCAN}
component={EmptyComponent}
Expand Down Expand Up @@ -163,29 +161,6 @@ export const MainTabNavigator = () => {
)
}}
/>
{isDesignSystemEnabled && (
<Tab.Screen
name={ROUTES.BARCODE_SCAN}
component={EmptyComponent}
listeners={{
tabPress: ({ preventDefault }) => {
preventDefault();
navigateToBarcodeScanScreen();
}
}}
options={{
title: I18n.t("global.navigator.scan"),
tabBarIcon: ({ color, focused }) => (
<TabIconComponent
iconName={"navScan"}
iconNameFocused={"navScan"}
color={color}
focused={focused}
/>
)
}}
/>
)}
<Tab.Screen
name={ROUTES.SERVICES_HOME}
component={ServicesHomeScreen}
Expand Down
1 change: 0 additions & 1 deletion ts/sagas/startup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ import {
isPnEnabledSelector
} from "../store/reducers/backendStatus";
import { refreshSessionToken } from "../features/fastLogin/store/actions/tokenRefreshActions";
import { enableWhatsNewCheck } from "../features/whatsnew/store/actions";
import { watchItwSaga } from "../features/it-wallet/saga";
import { itwLifecycleIsValidSelector } from "../features/it-wallet/store/reducers/itwLifecycleReducer";
import { itwDecodePid } from "../features/it-wallet/store/actions/itwCredentialsActions";
Expand Down
3 changes: 0 additions & 3 deletions ts/screens/messages/MessagesHomeScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ import {
} from "../../utils/accessibility";
import { useOnFirstRender } from "../../utils/hooks/useOnFirstRender";
import { showToast } from "../../utils/showToast";
import { useWhatsNew } from "../../features/whatsnew/hook/useWhatsNew";

import ROUTES from "../../navigation/routes";
import { ScreenContentHeader } from "../../components/screens/ScreenContentHeader";
Expand Down Expand Up @@ -74,8 +73,6 @@ const MessagesHomeScreen = ({
latestMessageOperation
}: Props) => {
const needsMigration = Object.keys(messagesStatus).length > 0;

const { checkToShowWhatsNew, autoResizableBottomSheet } = useWhatsNew();
const navigation = useNavigation();

useOnFirstRender(() => {
Expand Down

0 comments on commit f609f1b

Please sign in to comment.