From 568cac72bd1741a9933da604b40ba061b1597d06 Mon Sep 17 00:00:00 2001 From: Nishan Date: Tue, 10 Oct 2023 18:04:12 +0530 Subject: [PATCH] rename creator-tokens folder to creator-token --- .../creator-token/self-serve-explainer.tsx | 1 + apps/next/src/pages/creator-token/top.tsx | 1 + .../creator-tokens/self-serve-explainer.tsx | 1 - apps/next/src/pages/creator-tokens/top.tsx | 1 - .../creator-tokens-share.tsx | 0 .../self-serve-explainer.tsx | 0 .../top-creator-tokens.tsx | 0 packages/app/components/home/header.tsx | 2 +- .../home/top-part-creator-tokens.tsx | 4 ++-- .../profile/creator-tokens-panel.tsx | 18 +++++++++--------- ...-redirect-to-creator-tokens-share-screen.ts | 2 +- packages/app/navigation/linking.ts | 8 ++++---- .../self-serve-explainer.tsx | 0 .../{creator-tokens => creator-token}/top.tsx | 0 .../app/screens/creator-tokens-explanation.tsx | 2 +- .../creator-tokens-self-serve-explainer.tsx | 2 +- packages/app/screens/creator-tokens-share.tsx | 4 ++-- packages/app/screens/top-creator-tokens.tsx | 2 +- 18 files changed, 24 insertions(+), 24 deletions(-) create mode 100644 apps/next/src/pages/creator-token/self-serve-explainer.tsx create mode 100644 apps/next/src/pages/creator-token/top.tsx delete mode 100644 apps/next/src/pages/creator-tokens/self-serve-explainer.tsx delete mode 100644 apps/next/src/pages/creator-tokens/top.tsx rename packages/app/components/{creator-tokens => creator-token}/creator-tokens-share.tsx (100%) rename packages/app/components/{creator-tokens => creator-token}/self-serve-explainer.tsx (100%) rename packages/app/components/{creator-tokens => creator-token}/top-creator-tokens.tsx (100%) rename packages/app/pages/{creator-tokens => creator-token}/self-serve-explainer.tsx (100%) rename packages/app/pages/{creator-tokens => creator-token}/top.tsx (100%) diff --git a/apps/next/src/pages/creator-token/self-serve-explainer.tsx b/apps/next/src/pages/creator-token/self-serve-explainer.tsx new file mode 100644 index 0000000000..d8c6dc815f --- /dev/null +++ b/apps/next/src/pages/creator-token/self-serve-explainer.tsx @@ -0,0 +1 @@ +export { default } from "app/pages/creator-token/self-serve-explainer"; diff --git a/apps/next/src/pages/creator-token/top.tsx b/apps/next/src/pages/creator-token/top.tsx new file mode 100644 index 0000000000..01b0f2a6d7 --- /dev/null +++ b/apps/next/src/pages/creator-token/top.tsx @@ -0,0 +1 @@ +export { default } from "app/pages/creator-token/top"; diff --git a/apps/next/src/pages/creator-tokens/self-serve-explainer.tsx b/apps/next/src/pages/creator-tokens/self-serve-explainer.tsx deleted file mode 100644 index d1f8bbf874..0000000000 --- a/apps/next/src/pages/creator-tokens/self-serve-explainer.tsx +++ /dev/null @@ -1 +0,0 @@ -export { default } from "app/pages/creator-tokens/self-serve-explainer"; diff --git a/apps/next/src/pages/creator-tokens/top.tsx b/apps/next/src/pages/creator-tokens/top.tsx deleted file mode 100644 index a70e0d0379..0000000000 --- a/apps/next/src/pages/creator-tokens/top.tsx +++ /dev/null @@ -1 +0,0 @@ -export { default } from "app/pages/creator-tokens/top"; diff --git a/packages/app/components/creator-tokens/creator-tokens-share.tsx b/packages/app/components/creator-token/creator-tokens-share.tsx similarity index 100% rename from packages/app/components/creator-tokens/creator-tokens-share.tsx rename to packages/app/components/creator-token/creator-tokens-share.tsx diff --git a/packages/app/components/creator-tokens/self-serve-explainer.tsx b/packages/app/components/creator-token/self-serve-explainer.tsx similarity index 100% rename from packages/app/components/creator-tokens/self-serve-explainer.tsx rename to packages/app/components/creator-token/self-serve-explainer.tsx diff --git a/packages/app/components/creator-tokens/top-creator-tokens.tsx b/packages/app/components/creator-token/top-creator-tokens.tsx similarity index 100% rename from packages/app/components/creator-tokens/top-creator-tokens.tsx rename to packages/app/components/creator-token/top-creator-tokens.tsx diff --git a/packages/app/components/home/header.tsx b/packages/app/components/home/header.tsx index e7934966bc..6338b4d3d7 100644 --- a/packages/app/components/home/header.tsx +++ b/packages/app/components/home/header.tsx @@ -35,7 +35,7 @@ const CreatorTokensBanner = () => { { - router.push("/creator-tokens/self-serve-explainer"); + router.push("/creator-token/self-serve-explainer"); }} tw="text-13 ml-2 font-bold text-gray-900 underline" > diff --git a/packages/app/components/home/top-part-creator-tokens.tsx b/packages/app/components/home/top-part-creator-tokens.tsx index e98da13d5d..e6addaadd0 100644 --- a/packages/app/components/home/top-part-creator-tokens.tsx +++ b/packages/app/components/home/top-part-creator-tokens.tsx @@ -6,7 +6,7 @@ import { colors } from "@showtime-xyz/universal.tailwind"; import { Text } from "@showtime-xyz/universal.text"; import { View } from "@showtime-xyz/universal.view"; -import { TopCreatorTokensItem } from "../creator-tokens/top-creator-tokens"; +import { TopCreatorTokensItem } from "../creator-token/top-creator-tokens"; export const TopPartCreatorTokens = () => { const isDark = useIsDarkMode(); @@ -20,7 +20,7 @@ export const TopPartCreatorTokens = () => { { - router.push("/creator-tokens/top"); + router.push("/creator-token/top"); }} tw="text-xs font-semibold text-gray-500" > diff --git a/packages/app/components/profile/creator-tokens-panel.tsx b/packages/app/components/profile/creator-tokens-panel.tsx index 11c4dc1cc1..9684679134 100644 --- a/packages/app/components/profile/creator-tokens-panel.tsx +++ b/packages/app/components/profile/creator-tokens-panel.tsx @@ -26,7 +26,7 @@ export const CreatorTokensPanel = ({ isSelf }: CreatorTokensPanelProps) => { onPress={() => { router.push( Platform.select({ - native: "/creator-tokens/explanation", + native: "/creator-token/explanation", web: { pathname: router.pathname, query: { @@ -36,10 +36,10 @@ export const CreatorTokensPanel = ({ isSelf }: CreatorTokensPanelProps) => { } as any, }), Platform.select({ - native: "/creator-tokens/explanation", + native: "/creator-token/explanation", web: router.asPath === "/" - ? "/creator-tokens/explanation" + ? "/creator-token/explanation" : router.asPath, }), { shallow: true } @@ -66,7 +66,7 @@ export const CreatorTokensPanel = ({ isSelf }: CreatorTokensPanelProps) => { onPress={() => { router.push( Platform.select({ - native: "/creator-tokens/explanation", + native: "/creator-token/explanation", web: { pathname: router.pathname, query: { @@ -76,10 +76,10 @@ export const CreatorTokensPanel = ({ isSelf }: CreatorTokensPanelProps) => { } as any, }), Platform.select({ - native: "/creator-tokens/explanation", + native: "/creator-token/explanation", web: router.asPath === "/" - ? "/creator-tokens/explanation" + ? "/creator-token/explanation" : router.asPath, }), { shallow: true } @@ -140,7 +140,7 @@ export const CreatorTokensPanel = ({ isSelf }: CreatorTokensPanelProps) => { onPress={() => { router.push( Platform.select({ - native: "/creator-tokens/explanation", + native: "/creator-token/explanation", web: { pathname: router.pathname, query: { @@ -150,10 +150,10 @@ export const CreatorTokensPanel = ({ isSelf }: CreatorTokensPanelProps) => { } as any, }), Platform.select({ - native: "/creator-tokens/explanation", + native: "/creator-token/explanation", web: router.asPath === "/" - ? "/creator-tokens/explanation" + ? "/creator-token/explanation" : router.asPath, }), { shallow: true } diff --git a/packages/app/hooks/use-redirect-to-creator-tokens-share-screen.ts b/packages/app/hooks/use-redirect-to-creator-tokens-share-screen.ts index 7aa18a44ee..6d02f5e781 100644 --- a/packages/app/hooks/use-redirect-to-creator-tokens-share-screen.ts +++ b/packages/app/hooks/use-redirect-to-creator-tokens-share-screen.ts @@ -7,7 +7,7 @@ export const useRedirectToCreatorTokensShare = () => { const router = useRouter(); const redirectToCreatorTokensShare = useCallback( async (username: string) => { - const as = `/creator-tokens/${username}/share`; + const as = `/creator-token/${username}/share`; router.push( Platform.select({ native: as, diff --git a/packages/app/navigation/linking.ts b/packages/app/navigation/linking.ts index 84baf37824..7cae04140d 100644 --- a/packages/app/navigation/linking.ts +++ b/packages/app/navigation/linking.ts @@ -73,9 +73,9 @@ export const linking: LinkingOptions = { addEmail: "settings/add-email", verifyPhoneNumber: "settings/verify-phone-number", dropExplanation: "dropExplanation", - creatorTokensExplanation: "creator-tokens/explanation", + creatorTokensExplanation: "creator-token/explanation", enterInviteCode: "enterInviteCode", - creatorTokensSelfServeExplainer: "creator-tokens/self-serve-explainer", + creatorTokensSelfServeExplainer: "creator-token/self-serve-explainer", privacySecuritySettings: "settings/privacy-and-security", notificationSettings: "settings/notifications", blockedList: "settings/blocked-list", @@ -90,8 +90,8 @@ export const linking: LinkingOptions = { channelsMessageReactions: "channels/:channelId/messages/:messageId/reactions", channelUnlocked: "channels/:contractAddress/unlocked", - creatorTokensShare: "creator-tokens/:username/share", - topCreatorTokens: "creator-tokens/top", + creatorTokensShare: "creator-token/:username/share", + topCreatorTokens: "creator-token/top", bottomTabs: { initialRouteName: "homeTab", screens: { diff --git a/packages/app/pages/creator-tokens/self-serve-explainer.tsx b/packages/app/pages/creator-token/self-serve-explainer.tsx similarity index 100% rename from packages/app/pages/creator-tokens/self-serve-explainer.tsx rename to packages/app/pages/creator-token/self-serve-explainer.tsx diff --git a/packages/app/pages/creator-tokens/top.tsx b/packages/app/pages/creator-token/top.tsx similarity index 100% rename from packages/app/pages/creator-tokens/top.tsx rename to packages/app/pages/creator-token/top.tsx diff --git a/packages/app/screens/creator-tokens-explanation.tsx b/packages/app/screens/creator-tokens-explanation.tsx index 7cfa306b61..8fbe3860d7 100644 --- a/packages/app/screens/creator-tokens-explanation.tsx +++ b/packages/app/screens/creator-tokens-explanation.tsx @@ -6,7 +6,7 @@ export const CreatorTokensExplanationScreen = withModalScreen( CreatorTokensExplanation, { title: "", - matchingPathname: "/creator-tokens/explanation", + matchingPathname: "/creator-token/explanation", matchingQueryParam: "creatorTokensExplanationModal", tw: "w-full md:w-[420px] web:lg:pb-8", snapPoints: [400], diff --git a/packages/app/screens/creator-tokens-self-serve-explainer.tsx b/packages/app/screens/creator-tokens-self-serve-explainer.tsx index 3763a47b85..b9ce53143d 100644 --- a/packages/app/screens/creator-tokens-self-serve-explainer.tsx +++ b/packages/app/screens/creator-tokens-self-serve-explainer.tsx @@ -1,4 +1,4 @@ -import { SelfServeExplainer } from "app/components/creator-tokens/self-serve-explainer"; +import { SelfServeExplainer } from "app/components/creator-token/self-serve-explainer"; import { withColorScheme } from "app/components/memo-with-theme"; import { useUser } from "app/hooks/use-user"; import { useTrackPageViewed } from "app/lib/analytics"; diff --git a/packages/app/screens/creator-tokens-share.tsx b/packages/app/screens/creator-tokens-share.tsx index b00477f384..eb399a36a6 100644 --- a/packages/app/screens/creator-tokens-share.tsx +++ b/packages/app/screens/creator-tokens-share.tsx @@ -2,7 +2,7 @@ import { Platform } from "react-native"; import { withModalScreen } from "@showtime-xyz/universal.modal-screen"; -import { CreatorTokensShareModal } from "app/components/creator-tokens/creator-tokens-share"; +import { CreatorTokensShareModal } from "app/components/creator-token/creator-tokens-share"; export const CreatorTokensShareModalScreen = () => { if (Platform.OS !== "web") return ; @@ -13,7 +13,7 @@ const CreatorTokensShareWidthModalScreen = withModalScreen( CreatorTokensShareModal, { title: "", - matchingPathname: "/creator-tokens/[username]/share", + matchingPathname: "/creator-token/[username]/share", matchingQueryParam: "creatorTokensShareModal", disableBackdropPress: true, snapPoints: ["100%"], diff --git a/packages/app/screens/top-creator-tokens.tsx b/packages/app/screens/top-creator-tokens.tsx index dfefb19832..b76fc04419 100644 --- a/packages/app/screens/top-creator-tokens.tsx +++ b/packages/app/screens/top-creator-tokens.tsx @@ -1,4 +1,4 @@ -import { TopCreatorTokens } from "app/components/creator-tokens/top-creator-tokens"; +import { TopCreatorTokens } from "app/components/creator-token/top-creator-tokens"; import { withColorScheme } from "app/components/memo-with-theme"; import { useTrackPageViewed } from "app/lib/analytics";