-
Notifications
You must be signed in to change notification settings - Fork 318
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
131 additions
and
77 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
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
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
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
48 changes: 48 additions & 0 deletions
48
apps/ledger-live-mobile/src/newArch/features/Web3Hub/TabNavigator.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,48 @@ | ||
import React from "react"; | ||
import { useTranslation } from "react-i18next"; | ||
import { createNativeStackNavigator } from "@react-navigation/native-stack"; | ||
import { useSharedValue } from "react-native-reanimated"; | ||
import { ScreenName } from "~/const"; | ||
import { HeaderContext } from "./HeaderContext"; | ||
import Web3HubMain from "./screens/Web3HubMain"; | ||
import Web3HubMainHeader from "./screens/Web3HubMain/components/Header"; | ||
import { SearchProps } from "./types"; | ||
|
||
export type Web3HubTabStackParamList = { | ||
[ScreenName.Web3HubMain]: undefined; | ||
}; | ||
|
||
const Stack = createNativeStackNavigator<Web3HubTabStackParamList>(); | ||
|
||
export default function TabNavigator() { | ||
const { t } = useTranslation(); | ||
const layoutY = useSharedValue(0); | ||
|
||
return ( | ||
<HeaderContext.Provider | ||
value={{ | ||
layoutY, | ||
}} | ||
> | ||
<Stack.Navigator initialRouteName={ScreenName.Web3HubMain}> | ||
<Stack.Screen | ||
name={ScreenName.Web3HubMain} | ||
component={Web3HubMain} | ||
options={{ | ||
title: t("web3hub.main.header.title"), | ||
// Never just pass a component to header like `header: Web3HubMainHeader,` | ||
// as it would break the fast-refresh for the header | ||
header: props => ( | ||
<Web3HubMainHeader | ||
title={props.options.title} | ||
// Using as here because we cannot use generics on the header props | ||
navigation={props.navigation as SearchProps["navigation"]} | ||
/> | ||
), | ||
animation: "none", | ||
}} | ||
/> | ||
</Stack.Navigator> | ||
</HeaderContext.Provider> | ||
); | ||
} |
20 changes: 18 additions & 2 deletions
20
apps/ledger-live-mobile/src/newArch/features/Web3Hub/__integrations__/shared.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 |
---|---|---|
@@ -1,11 +1,27 @@ | ||
import React from "react"; | ||
import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; | ||
import Web3HubNavigator from "../Navigator"; | ||
import Navigator from "../Navigator"; | ||
import TabNavigator from "../TabNavigator"; | ||
import { createNativeStackNavigator } from "@react-navigation/native-stack"; | ||
import { NavigatorName } from "~/const"; | ||
|
||
const Stack = createNativeStackNavigator(); | ||
|
||
export function Web3HubTest() { | ||
return ( | ||
<QueryClientProvider client={new QueryClient()}> | ||
<Web3HubNavigator /> | ||
<Stack.Navigator initialRouteName={NavigatorName.Web3HubTab}> | ||
<Stack.Screen | ||
name={NavigatorName.Web3HubTab} | ||
component={TabNavigator} | ||
options={{ headerShown: false }} | ||
/> | ||
<Stack.Screen | ||
name={NavigatorName.Web3Hub} | ||
component={Navigator} | ||
options={{ headerShown: false }} | ||
/> | ||
</Stack.Navigator> | ||
</QueryClientProvider> | ||
); | ||
} |
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
8 changes: 2 additions & 6 deletions
8
apps/ledger-live-mobile/src/newArch/features/Web3Hub/screens/Web3HubApp/index.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
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
9 changes: 2 additions & 7 deletions
9
apps/ledger-live-mobile/src/newArch/features/Web3Hub/screens/Web3HubMain/index.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
7 changes: 1 addition & 6 deletions
7
...newArch/features/Web3Hub/screens/Web3HubSearch/components/SearchList/SearchItem/index.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
9 changes: 2 additions & 7 deletions
9
apps/ledger-live-mobile/src/newArch/features/Web3Hub/screens/Web3HubSearch/index.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
10 changes: 3 additions & 7 deletions
10
apps/ledger-live-mobile/src/newArch/features/Web3Hub/screens/Web3HubTabs/index.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
Oops, something went wrong.