Skip to content

Commit

Permalink
fix: refacto launchpad applications table (already exists)
Browse files Browse the repository at this point in the history
  • Loading branch information
WaDadidou committed Jun 30, 2024
1 parent 25ad2d6 commit 22c3d8b
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 184 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { TouchableOpacity, View, useWindowDimensions } from "react-native";
import { ApplicationStatusCard } from "./component/ApplicationStatusCard";
import { CurrentlyHighlightedProject } from "./component/CurrentlyHighLightedProject";
import { GenesisExplore } from "./component/GenesisExplore";
import { LaunchpadCollectionsTable } from "./component/LaunchpadCollectionsTable";
import { LaunchpadCollectionsTable } from "../LaunchpadApplications/component/LaunchpadCollectionsTable";

import { BrandText } from "@/components/BrandText";
import { ScreenContainer } from "@/components/ScreenContainer";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,33 +1,21 @@
import React, { useState } from "react";
import { View } from "react-native";

import { ApplicationsCollectionsTable } from "./component/ApplicationsCollectionsTable";

import { BrandText } from "@/components/BrandText";
import { ScreenContainer } from "@/components/ScreenContainer";
import { HighVolSortButton } from "@/components/sorts/HighVolSortButton";
import { Tabs } from "@/components/tabs/Tabs";
import { useAppNavigation } from "@/hooks/navigation/useAppNavigation";
import { useIsMobile } from "@/hooks/useIsMobile";
import { NetworkFeature } from "@/networks";
import { DummyLaunchpadCollection } from "@/screens/Launchpad/LaunchpadAdmin/LaunchpadAdministrationOverview/LaunchpadAdministrationOverviewScreen";
import { LaunchpadCollectionsTable } from "@/screens/Launchpad/LaunchpadAdmin/LaunchpadApplications/component/LaunchpadCollectionsTable";
import { neutral33 } from "@/utils/style/colors";
import { fontSemibold20, fontSemibold28 } from "@/utils/style/fonts";
import { layout } from "@/utils/style/layout";

type TabsListType = "pendingApplications" | "pendingConfirmations";

const dummyData = {
id: 1,
rank: 1,
collectionNameData: "The R!ot",
collectionNetwork: "teritori",
TwitterURL: "https://www.lipsum.com/",
DiscordURL: "https://www.lipsum.com/",
expectedTotalSupply: 3000,
expectedPublicMintPrice: "550 L",
expectedMintDate: new Date(),
};

export const LaunchpadApplicationsScreen: React.FC = () => {
const navigation = useAppNavigation();
const isMobile = useIsMobile();
Expand All @@ -47,6 +35,20 @@ export const LaunchpadApplicationsScreen: React.FC = () => {
"pendingApplications",
);

const dummyData: DummyLaunchpadCollection[] = Array(25)
.fill({
id: 0,
rank: 0,
collectionNameData: "The R!ot",
collectionNetwork: "teritori",
TwitterURL: "https://www.lipsum.com/",
DiscordURL: "https://www.lipsum.com/",
expectedTotalSupply: 3000,
expectedPublicMintPrice: "550 L",
expectedMintDate: new Date(),
})
.map((item, index) => ({ ...item, id: index + 1, rank: index + 1 }));

return (
<ScreenContainer
isLarge
Expand Down Expand Up @@ -107,7 +109,7 @@ export const LaunchpadApplicationsScreen: React.FC = () => {
marginTop: layout.spacing_x4,
}}
>
<ApplicationsCollectionsTable rows={Array(25).fill(dummyData)} />
<LaunchpadCollectionsTable rows={dummyData} />
</View>
</View>
</ScreenContainer>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const LaunchpadCollectionsTable: React.FC<{
<FlatList
data={rows}
renderItem={({ item, index }) => (
<LaunchpadCollectionTableRow collection={item} index={index} />
<LaunchpadCollectionsTableRow collection={item} index={index} />
)}
keyExtractor={(item) => item.id.toString()}
/>
Expand All @@ -89,7 +89,7 @@ export const LaunchpadCollectionsTable: React.FC<{
);
};

const LaunchpadCollectionTableRow: React.FC<{
const LaunchpadCollectionsTableRow: React.FC<{
collection: DummyLaunchpadCollection;
index: number;
// prices: CoingeckoPrices;
Expand Down

0 comments on commit 22c3d8b

Please sign in to comment.