Skip to content

Commit

Permalink
feat(BurnCapitalScreen): remove unused Tabs and related code
Browse files Browse the repository at this point in the history
  • Loading branch information
omniwired committed May 28, 2024
1 parent 350f60e commit 0a1aaea
Showing 1 changed file with 1 addition and 31 deletions.
32 changes: 1 addition & 31 deletions packages/screens/BurnCapital/BurnCapitalScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import React, { useEffect, useState } from "react";
import React, { useEffect } from "react";
import { View } from "react-native";
import { useDispatch } from "react-redux";

import { BrandText } from "@/components/BrandText";
import { ScreenContainer } from "@/components/ScreenContainer";
import { Tabs } from "@/components/tabs/Tabs";
import { useNFTBurnerTotal } from "@/hooks/nft-burner/useNFTBurnerTotal";
import { useNFTBurnerUserCount } from "@/hooks/nft-burner/useNFTBurnerUserCount";
import { useIsMobile } from "@/hooks/useIsMobile";
Expand All @@ -20,15 +19,6 @@ import { neutral00, neutral33 } from "@/utils/style/colors";
import { fontSemibold20 } from "@/utils/style/fonts";
import { layout } from "@/utils/style/layout";

const tabs = {
burn: {
name: "Burn NFTs",
},
leaderboard: {
name: "Leaderboard",
},
};

export const BurnCapitalScreen: ScreenFC<"BurnCapital"> = ({ route }) => {
const inputNetwork = route.params?.network;
const selectedWallet = useSelectedWallet();
Expand All @@ -48,10 +38,6 @@ export const BurnCapitalScreen: ScreenFC<"BurnCapital"> = ({ route }) => {
dispatch(setSelectedNetworkId(network.id));
}, [dispatch, inputNetwork]);

const [selectedTab, setSelectedTab] = useState<"burn" | "leaderboard">(
"burn",
);

const { data: count } = useNFTBurnerUserCount(selectedWallet?.userId);
const { data: total } = useNFTBurnerTotal(selectedNetworkId);
return (
Expand All @@ -78,29 +64,13 @@ export const BurnCapitalScreen: ScreenFC<"BurnCapital"> = ({ route }) => {
alignItems: "center",
}}
>
<Tabs
items={tabs}
selected={selectedTab}
style={{ height: 48 }}
onSelect={setSelectedTab}
/>

<TopSectionConnectWallet />
{typeof total === "number" && (
<BrandText>Total burned: {total}</BrandText>
)}
{typeof count === "number" && (
<BrandText>Burned by you: {count}</BrandText>
)}
{/*{nftCollectionToBurn.map((nft) => (*/}
{/* <CollectionContent*/}
{/* key={nft.id}*/}
{/* id={nft.id}*/}
{/* selectedTab="owned"*/}
{/* sortDirection={1}*/}
{/* style={{ marginHorizontal: layout.spacing_x3 }}*/}
{/* />*/}
{/*))}*/}

<BurnableNFTs
ownerId={selectedWallet?.userId || ""}
Expand Down

0 comments on commit 0a1aaea

Please sign in to comment.