Skip to content

Commit

Permalink
feat(WalletManager): Add Wallet Manager title and back navigation (fi…
Browse files Browse the repository at this point in the history
…x/omnifixes)
  • Loading branch information
omniwired committed Sep 25, 2023
1 parent 1f4850a commit da1c2c2
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 26 deletions.
20 changes: 0 additions & 20 deletions packages/screens/WalletManager/WalletHeader.tsx

This file was deleted.

14 changes: 11 additions & 3 deletions packages/screens/WalletManager/WalletManagerScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,32 @@ import { View } from "react-native";
import { Assets } from "./Assets";
import { MyNFTs } from "./MyNFTs";
import { WalletDashboardHeader } from "./WalletDashboardHeader";
import { WalletHeader } from "./WalletHeader";
import { Wallets } from "./Wallets";
import { BrandText } from "../../components/BrandText";
import { ScreenContainer } from "../../components/ScreenContainer";
import { MainConnectWalletButton } from "../../components/connectWallet/MainConnectWalletButton";
import { useAreThereWallets } from "../../hooks/useAreThereWallets";
import { useMaxResolution } from "../../hooks/useMaxResolution";
import useSelectedWallet from "../../hooks/useSelectedWallet";
import { ScreenFC } from "../../utils/navigation";
import { ScreenFC, useAppNavigation } from "../../utils/navigation";
import { neutral33 } from "../../utils/style/colors";
import { fontSemibold20 } from "../../utils/style/fonts";
import { layout } from "../../utils/style/layout";

export const WalletManagerScreen: ScreenFC<"WalletManager"> = () => {
const selectedWallet = useSelectedWallet();
const areThereWallets = useAreThereWallets();
const { height } = useMaxResolution();
const navigation = useAppNavigation();

return (
<ScreenContainer headerChildren={<WalletHeader />}>
<ScreenContainer
headerChildren={
<BrandText style={fontSemibold20}>Wallet Manager</BrandText>
}
responsive
onBackPress={() => navigation.navigate("WalletManager")}
>
{areThereWallets ? (
<View
style={{
Expand Down
13 changes: 10 additions & 3 deletions packages/screens/WalletManager/WalletsScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, { useState } from "react";
import { View, TouchableOpacity } from "react-native";

import { WalletHeader } from "./WalletHeader";
import { WalletItem, WalletItemProps } from "./WalletItem";
import chevronDownSVG from "../../../assets/icons/chevron-down.svg";
import chevronUpSVG from "../../../assets/icons/chevron-up.svg";
Expand All @@ -14,9 +13,10 @@ import { PrimaryButton } from "../../components/buttons/PrimaryButton";
import { ConnectWalletModal } from "../../components/connectWallet/ConnectWalletModal";
import { useRewards } from "../../hooks/useRewards";
import useSelectedWallet from "../../hooks/useSelectedWallet";
import { ScreenFC } from "../../utils/navigation";
import { ScreenFC, useAppNavigation } from "../../utils/navigation";
import { walletProviderToNetworkKind } from "../../utils/network";
import { neutral33, neutralA3, secondaryColor } from "../../utils/style/colors";
import { fontSemibold20 } from "../../utils/style/fonts";

interface WalletProps {
index: number;
Expand Down Expand Up @@ -107,6 +107,7 @@ export const WalletManagerWalletsScreen: ScreenFC<
> = () => {
const [showConnectModal, setShowConnectModal] = useState(false);
const selectedWallet = useSelectedWallet();
const navigation = useAppNavigation();

// TODO: Handle multiple wallets addresses
const { totalsRewards, claimReward } = useRewards(selectedWallet?.userId);
Expand Down Expand Up @@ -135,7 +136,13 @@ export const WalletManagerWalletsScreen: ScreenFC<
: [];

return (
<ScreenContainer headerChildren={<WalletHeader />}>
<ScreenContainer
headerChildren={
<BrandText style={fontSemibold20}>Wallet Manager</BrandText>
}
responsive
onBackPress={() => navigation.navigate("WalletManager")}
>
<View
style={{
paddingVertical: 48,
Expand Down

0 comments on commit da1c2c2

Please sign in to comment.