Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
alantoa committed Oct 9, 2023
1 parent fa3af14 commit 21ee823
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default } from "app/pages/creator-channels/self-serve-explainer";
export { default } from "app/pages/creator-tokens/self-serve-explainer";
1 change: 1 addition & 0 deletions apps/next/src/pages/creator-tokens/top.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from "app/pages/creator-tokens/top";
23 changes: 18 additions & 5 deletions packages/app/components/creator-tokens/self-serve-explainer.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
import { SafeAreaView } from "react-native-safe-area-context";

import { Avatar } from "@showtime-xyz/universal.avatar";
import { Button } from "@showtime-xyz/universal.button";
import { useIsDarkMode } from "@showtime-xyz/universal.hooks";
import { Flip, ShowtimeRounded } from "@showtime-xyz/universal.icon";
import { Image } from "@showtime-xyz/universal.image";
import { useSafeAreaInsets } from "@showtime-xyz/universal.safe-area";
import { colors } from "@showtime-xyz/universal.tailwind";
import { Text } from "@showtime-xyz/universal.text";
import { View } from "@showtime-xyz/universal.view";

import { useContentWidth } from "app/hooks/use-content-width";
import { useRedirectToCreatorTokensShare } from "app/hooks/use-redirect-to-creator-tokens-share-screen";
import { useUser } from "app/hooks/use-user";

export const SelfServeExplainer = () => {
const isDark = useIsDarkMode();
const width = useContentWidth();
const { user } = useUser();
const { top } = useSafeAreaInsets();
const redirectToCreatorTokensShare = useRedirectToCreatorTokensShare();
return (
<SafeAreaView style={{ paddingTop: 48, paddingHorizontal: 20 }}>
<View
tw="md:max-w-screen-content min-h-screen px-5"
style={{ paddingTop: 48 + top, paddingHorizontal: 20 }}
>
<Text tw="text-2xl font-bold text-gray-900 dark:text-white">
You're invited to be first.
</Text>
Expand Down Expand Up @@ -63,7 +68,15 @@ export const SelfServeExplainer = () => {
be its image. You can update this later.
</Text>
</View>
<Button size="regular" tw="w-full">
<Button
size="regular"
tw="w-full"
onPress={() => {
if (user?.data.profile.username) {
redirectToCreatorTokensShare(user?.data.profile.username);
}
}}
>
<>
<ShowtimeRounded
color={isDark ? colors.gray[900] : colors.white}
Expand All @@ -76,6 +89,6 @@ export const SelfServeExplainer = () => {
</>
</Button>
</View>
</SafeAreaView>
</View>
);
};
2 changes: 1 addition & 1 deletion packages/app/components/home/top-part-creator-tokens.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const TopPartCreatorTokens = () => {
</Text>
<Text
onPress={() => {
router.push("/topCreatorTokens");
router.push("/creator-tokens/top");
}}
tw="text-xs font-semibold text-gray-500"
>
Expand Down
2 changes: 1 addition & 1 deletion packages/app/navigation/linking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const linking: LinkingOptions<ReactNavigation.RootParamList> = {
"channels/:channelId/messages/:messageId/reactions",
channelUnlocked: "channels/:contractAddress/unlocked",
creatorTokensShare: "creator-tokens/:username/share",
topCreatorTokens: "topCreatorTokens",
topCreatorTokens: "creator-tokens/top",
bottomTabs: {
initialRouteName: "homeTab",
screens: {
Expand Down
7 changes: 7 additions & 0 deletions packages/app/pages/creator-tokens/top.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { TopCreatorTokensScreen } from "app/screens/top-creator-tokens";

const TopCreatorTokens = () => {
return <TopCreatorTokensScreen />;
};

export default TopCreatorTokens;

0 comments on commit 21ee823

Please sign in to comment.