-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add llm card * refactor: refactor naming * refactor: fix some pr comments (_props, extra dependencies, defaultManifest, undefined type) * refactor: pr comments multiSet and other small changes * refactor: unify ptxApp types * refactor: remove extra setBtnText * refactor: remove extra _props type
- Loading branch information
Showing
13 changed files
with
257 additions
and
198 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
apps/ledger-live-mobile/src/components/RootNavigator/CardLiveAppNavigator.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import React, { useMemo } from "react"; | ||
import { createStackNavigator } from "@react-navigation/stack"; | ||
import { useTheme } from "styled-components/native"; | ||
import { CARD_APP_ID } from "@ledgerhq/live-common/wallet-api/constants"; | ||
import { NavigatorName, ScreenName } from "~/const"; | ||
import { getStackNavigatorConfig } from "~/navigation/navigatorConfig"; | ||
|
||
import styles from "~/navigation/styles"; | ||
import type { StackNavigatorProps } from "./types/helpers"; | ||
import { PtxScreen } from "~/screens/PTX"; | ||
import { useTranslation } from "react-i18next"; | ||
import { PtxNavigatorParamList } from "~/components/RootNavigator/types/PtxNavigator"; | ||
|
||
const Stack = createStackNavigator<PtxNavigatorParamList>(); | ||
|
||
const Card = (props: StackNavigatorProps<PtxNavigatorParamList, ScreenName.Card>) => { | ||
const { t } = useTranslation(); | ||
const { goToURL, lastScreen, platform, referrer } = props.route.params || {}; | ||
return ( | ||
<PtxScreen | ||
{...props} | ||
config={{ | ||
screen: ScreenName.Card, | ||
navigator: NavigatorName.Card, | ||
btnText: t("browseWeb3.webPlatformPlayer.back.card"), | ||
}} | ||
route={{ | ||
...props.route, | ||
params: { | ||
goToURL, | ||
lastScreen, | ||
platform: platform || CARD_APP_ID, | ||
referrer, | ||
}, | ||
}} | ||
/> | ||
); | ||
}; | ||
|
||
export default function CardLiveAppNavigator() { | ||
const { colors } = useTheme(); | ||
|
||
const stackNavigationConfig = useMemo(() => getStackNavigatorConfig(colors, true), [colors]); | ||
return ( | ||
<Stack.Navigator {...stackNavigationConfig}> | ||
<Stack.Screen | ||
name={ScreenName.Card} | ||
options={{ | ||
headerStyle: styles.headerNoShadow, | ||
title: "", | ||
}} | ||
> | ||
{props => <Card {...props} />} | ||
</Stack.Screen> | ||
</Stack.Navigator> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 0 additions & 35 deletions
35
apps/ledger-live-mobile/src/components/RootNavigator/types/ExchangeLiveAppNavigator.ts
This file was deleted.
Oops, something went wrong.
34 changes: 0 additions & 34 deletions
34
apps/ledger-live-mobile/src/components/RootNavigator/types/ExchangeNavigator.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.