From f266105f3e7c7f06871b7659308aa069cec56adf Mon Sep 17 00:00:00 2001 From: WaDadidou <50441633+WaDadidou@users.noreply.github.com> Date: Thu, 7 Nov 2024 03:19:12 -0500 Subject: [PATCH] chore: Reuse a ImageBackgroundLogoText on TNS, NFT Launchpad and Launchpad ERC20, remove unused svg (#1338) --- assets/icons/logo-simple.svg | 36 --------------- .../components/ImageBackgroundLogoText.tsx | 38 ++++++++++++++++ packages/components/IntroLogoText.tsx | 39 ---------------- .../LaunchpadApply/LaunchpadApplyScreen.tsx | 9 ++-- .../components/LaunchpadBanner.tsx | 43 ------------------ .../LaunchpadERC20/LaunchpadERC20Screen.tsx | 9 ++-- .../component/LaunchpadERC20Banner.tsx | 44 ------------------- .../TeritoriNameService/TNSHomeScreen.tsx | 6 +-- 8 files changed, 53 insertions(+), 171 deletions(-) delete mode 100644 assets/icons/logo-simple.svg create mode 100644 packages/components/ImageBackgroundLogoText.tsx delete mode 100644 packages/components/IntroLogoText.tsx delete mode 100644 packages/screens/Launchpad/LaunchpadApply/LaunchpadCreate/components/LaunchpadBanner.tsx delete mode 100644 packages/screens/LaunchpadERC20/component/LaunchpadERC20Banner.tsx diff --git a/assets/icons/logo-simple.svg b/assets/icons/logo-simple.svg deleted file mode 100644 index 1a3173363b..0000000000 --- a/assets/icons/logo-simple.svg +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/components/ImageBackgroundLogoText.tsx b/packages/components/ImageBackgroundLogoText.tsx new file mode 100644 index 0000000000..606b6150ee --- /dev/null +++ b/packages/components/ImageBackgroundLogoText.tsx @@ -0,0 +1,38 @@ +import { FC } from "react"; +import { ImageBackground, ImageSourcePropType, TextStyle } from "react-native"; + +import { BrandText } from "./BrandText"; +import { SVG } from "./SVG"; +import { SpacerColumn } from "./spacer"; + +import logoSVG from "@/assets/logos/logo-white.svg"; +import { useMaxResolution } from "@/hooks/useMaxResolution"; +import { fontSemibold22, fontSemibold28 } from "@/utils/style/fonts"; +import { RESPONSIVE_BREAKPOINT_S } from "@/utils/style/layout"; + +export const ImageBackgroundLogoText: FC<{ + text: string; + backgroundImage: ImageSourcePropType; +}> = ({ text, backgroundImage }) => { + const { width } = useMaxResolution(); + const isSmallScreen = width < RESPONSIVE_BREAKPOINT_S; + const logoSize = isSmallScreen ? 70 : 88; + const fontStyle: TextStyle = isSmallScreen ? fontSemibold22 : fontSemibold28; + const height = 380; + + return ( + + + + {text} + + ); +}; diff --git a/packages/components/IntroLogoText.tsx b/packages/components/IntroLogoText.tsx deleted file mode 100644 index 217a7ff920..0000000000 --- a/packages/components/IntroLogoText.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import React from "react"; -import { StyleProp, ViewStyle, ImageBackground } from "react-native"; - -import { BrandText } from "./BrandText"; -import { SVG } from "./SVG"; -import logoSVG from "../../assets/logos/logo-white.svg"; -import { fontSemibold28 } from "../utils/style/fonts"; - -export const IntroLogoText: React.FC<{ - title: string; - backgroundImage: any; - style?: StyleProp; -}> = ({ title, backgroundImage, style }) => { - const height = 380; - - return ( - - - - {title} - - - ); -}; diff --git a/packages/screens/Launchpad/LaunchpadApply/LaunchpadApplyScreen.tsx b/packages/screens/Launchpad/LaunchpadApply/LaunchpadApplyScreen.tsx index 3236178dae..6fd2715f5e 100644 --- a/packages/screens/Launchpad/LaunchpadApply/LaunchpadApplyScreen.tsx +++ b/packages/screens/Launchpad/LaunchpadApply/LaunchpadApplyScreen.tsx @@ -1,9 +1,9 @@ import React from "react"; import { StyleSheet, View } from "react-native"; -import { LaunchpadBanner } from "./LaunchpadCreate/components/LaunchpadBanner"; - +import LaunchpadBannerImage from "@/assets/banners/launchpad.jpg"; import { BrandText } from "@/components/BrandText"; +import { ImageBackgroundLogoText } from "@/components/ImageBackgroundLogoText"; import { ScreenContainer } from "@/components/ScreenContainer"; import { LargeBoxButton, @@ -36,7 +36,10 @@ const BUTTONS: LargeBoxButtonProps[] = [ export const LaunchpadApplyScreen: ScreenFC<"LaunchpadApply"> = () => { return ( - + Welcome diff --git a/packages/screens/Launchpad/LaunchpadApply/LaunchpadCreate/components/LaunchpadBanner.tsx b/packages/screens/Launchpad/LaunchpadApply/LaunchpadCreate/components/LaunchpadBanner.tsx deleted file mode 100644 index 2dbb2263ac..0000000000 --- a/packages/screens/Launchpad/LaunchpadApply/LaunchpadCreate/components/LaunchpadBanner.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import React from "react"; -import { Image, View } from "react-native"; - -import LaunchpadBannerImage from "@/assets/banners/launchpad.jpg"; -import LogoSimpleSvg from "@/assets/icons/logo-simple.svg"; -import { BrandText } from "@/components/BrandText"; -import { SVG } from "@/components/SVG"; -import { SpacerColumn } from "@/components/spacer"; -import { useMaxResolution } from "@/hooks/useMaxResolution"; -import { fontSemibold16, fontSemibold28 } from "@/utils/style/fonts"; -import { RESPONSIVE_BREAKPOINT_S } from "@/utils/style/layout"; - -export const LaunchpadBanner: React.FC = () => { - const { width } = useMaxResolution(); - const isSmallScreen = width < RESPONSIVE_BREAKPOINT_S; - const logoSize = isSmallScreen ? 44 : 88; - const font = isSmallScreen ? fontSemibold16 : fontSemibold28; - - return ( - - - - - - Launchpad Submission Form - - - ); -}; diff --git a/packages/screens/LaunchpadERC20/LaunchpadERC20Screen.tsx b/packages/screens/LaunchpadERC20/LaunchpadERC20Screen.tsx index 5d95a4a806..111ea37bb3 100644 --- a/packages/screens/LaunchpadERC20/LaunchpadERC20Screen.tsx +++ b/packages/screens/LaunchpadERC20/LaunchpadERC20Screen.tsx @@ -1,9 +1,9 @@ import React from "react"; import { StyleSheet, View } from "react-native"; -import { LaunchpadERC20Banner } from "./component/LaunchpadERC20Banner"; - +import LaunchpadERC20BannerImage from "@/assets/banners/launchpadERC20.jpg"; import { BrandText } from "@/components/BrandText"; +import { ImageBackgroundLogoText } from "@/components/ImageBackgroundLogoText"; import { OmniLink } from "@/components/OmniLink"; import { ScreenContainer } from "@/components/ScreenContainer"; import { @@ -43,7 +43,10 @@ export const LaunchpadERC20Screen: ScreenFC<"LaunchpadERC20"> = () => { forceNetworkFeatures={[NetworkFeature.LaunchpadERC20]} forceNetworkKind={NetworkKind.Gno} > - + diff --git a/packages/screens/LaunchpadERC20/component/LaunchpadERC20Banner.tsx b/packages/screens/LaunchpadERC20/component/LaunchpadERC20Banner.tsx deleted file mode 100644 index 01089cf31d..0000000000 --- a/packages/screens/LaunchpadERC20/component/LaunchpadERC20Banner.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import React from "react"; -import { Image, View } from "react-native"; - -import LaunchpadERC20BannerImage from "../../../../assets/banners/launchpadERC20.jpg"; -import LogoSimpleSvg from "../../../../assets/icons/logo-simple.svg"; - -import { BrandText } from "@/components/BrandText"; -import { SVG } from "@/components/SVG"; -import { SpacerColumn } from "@/components/spacer"; -import { useMaxResolution } from "@/hooks/useMaxResolution"; -import { fontSemibold16, fontSemibold28 } from "@/utils/style/fonts"; -import { RESPONSIVE_BREAKPOINT_S } from "@/utils/style/layout"; - -export const LaunchpadERC20Banner: React.FC = () => { - const { width } = useMaxResolution(); - const isSmallScreen = width < RESPONSIVE_BREAKPOINT_S; - const logoSize = isSmallScreen ? 44 : 88; - const font = isSmallScreen ? fontSemibold16 : fontSemibold28; - - return ( - - - - - - Launchpad ERC20 Platform - - - ); -}; diff --git a/packages/screens/TeritoriNameService/TNSHomeScreen.tsx b/packages/screens/TeritoriNameService/TNSHomeScreen.tsx index 5564bb5803..45ec930f5d 100644 --- a/packages/screens/TeritoriNameService/TNSHomeScreen.tsx +++ b/packages/screens/TeritoriNameService/TNSHomeScreen.tsx @@ -15,7 +15,7 @@ import registerSVG from "../../../assets/icons/register-neutral77.svg"; import useSelectedWallet from "../../hooks/useSelectedWallet"; import { BrandText } from "@/components/BrandText"; -import { IntroLogoText } from "@/components/IntroLogoText"; +import { ImageBackgroundLogoText } from "@/components/ImageBackgroundLogoText"; import { ScreenContainer } from "@/components/ScreenContainer"; import { ActivityTable } from "@/components/activity/ActivityTable"; import { FlowCard } from "@/components/cards/FlowCard"; @@ -139,8 +139,8 @@ export const TNSHomeScreen: ScreenFC<"TNSHome"> = ({ route }) => { responsive > -