-
Notifications
You must be signed in to change notification settings - Fork 22
/
HubLanding.tsx
142 lines (136 loc) · 4.93 KB
/
HubLanding.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
import React from "react";
import { View, Linking } from "react-native";
import airdropSVG from "../../../assets/icons/airdrop.svg";
import labsSVG from "../../../assets/icons/labs.svg";
import launchpadSVG from "../../../assets/icons/launchpad.svg";
import marketplaceSVG from "../../../assets/icons/marketplace.svg";
import stakingSVG from "../../../assets/icons/staking.svg";
import {
MintState,
Sort,
SortDirection,
} from "../../api/marketplace/v1/marketplace";
import { useBanners } from "../../hooks/marketing/useBanners";
import { useMaxResolution } from "../../hooks/useMaxResolution";
import { useSelectedNetworkId } from "../../hooks/useSelectedNetwork";
import { Link } from "../Link";
import { OptimizedImage } from "../OptimizedImage";
import { Section } from "../Section";
import { DAppCard } from "../cards/DAppCard";
import { LabelCard } from "../cards/LabelCard";
import { MyWalletsCard } from "../cards/MyWalletsCard";
import { CollectionsCarouselSection } from "../carousels/CollectionsCarouselSection";
import { NewsCarouselSection } from "../carousels/NewsCarouselSection";
import { useAppNavigation } from "@/hooks/navigation/useAppNavigation";
const gridHalfGutter = 12;
export const HubLanding: React.FC = () => {
const navigation = useAppNavigation();
const { width } = useMaxResolution();
const networkId = useSelectedNetworkId();
const banners = useBanners(networkId);
const banner = banners?.length ? banners[0] : undefined;
return (
<View style={{ alignItems: "center", width: "100%" }}>
<View style={{ flex: 1 }}>
{!!banner && (
<Link to={banner?.url} style={{ width: "100%", maxHeight: 500 }}>
<OptimizedImage
sourceURI={banner?.image}
width={width}
height={350}
style={{
height: 350,
width,
borderRadius: 20,
marginTop: 56,
}}
/>
</Link>
)}
<NewsCarouselSection />
<Section title="My Dashboard">
<View
style={{
flexDirection: "row",
flexWrap: "wrap",
margin: -gridHalfGutter,
}}
>
<MyWalletsCard
onPress={() => navigation.navigate("WalletManager")}
/>
<DAppCard
onPress={() => navigation.navigate("Staking")}
label="Staking"
description="Participate to the Security Get rewards by delegating to Teritori validators"
info="Staking on Keplr!"
iconSVG={stakingSVG}
/>
<DAppCard
label="Marketplace"
description="Trade your NFTs & TNS and rank up on your profile by contributing to expansion"
info="Explore Collections"
iconSVG={marketplaceSVG}
onPress={() => navigation.navigate("Marketplace")}
/>
<DAppCard
label="Launchpad"
description="Apply to a NFT Launch on Teritori Launchpad and get validated & pushed by the community."
info="Apply here"
iconSVG={launchpadSVG}
onPress={() => navigation.navigate("Launchpad")}
/>
<DAppCard
label="Tori Labs"
description="Get funds to develop, contribute and build new feature for Communities"
info="Apply here"
iconSVG={labsSVG}
onPress={() => Linking.openURL("https://teritori.com/projects")}
/>
</View>
</Section>
<Section title="Coming soon dApps">
<View
style={{
flexDirection: "row",
flexWrap: "wrap",
margin: -gridHalfGutter,
}}
>
<LabelCard label="Raffle" style={{ margin: gridHalfGutter }} />
<LabelCard label="Lottery" style={{ margin: gridHalfGutter }} />
<LabelCard
label="Group
Chats"
style={{ margin: gridHalfGutter }}
/>
<LabelCard
label="DAO
Launch"
style={{ margin: gridHalfGutter }}
/>
<DAppCard
label="Contribute!"
description="Want to build new dApps? Join the Bounty Program & get your project funded."
info="Apply here"
iconSVG={airdropSVG}
onPress={() => Linking.openURL("https://app.dework.xyz/teritori")}
/>
</View>
</Section>
<CollectionsCarouselSection
title="Upcoming Launches on Teritori Launch Pad"
req={{
upcoming: true,
networkId,
sortDirection: SortDirection.SORT_DIRECTION_UNSPECIFIED,
sort: Sort.SORT_UNSPECIFIED,
limit: 16,
offset: 0,
mintState: MintState.MINT_STATE_UNSPECIFIED,
}}
/>
</View>
</View>
);
};