diff --git a/packages/atlas/src/views/global/YppLandingView/YppLandingViewOld.tsx b/packages/atlas/src/views/global/YppLandingView/YppLandingViewOld.tsx deleted file mode 100644 index 2e7a20bd2a..0000000000 --- a/packages/atlas/src/views/global/YppLandingView/YppLandingViewOld.tsx +++ /dev/null @@ -1,121 +0,0 @@ -import AOS from 'aos' -import 'aos/dist/aos.css' -import { FC, useCallback, useEffect, useState } from 'react' -import { useNavigate } from 'react-router-dom' -import { ParallaxProvider } from 'react-scroll-parallax' - -import { YppReferralBanner } from '@/components/_ypp/YppReferralBanner' -import { absoluteRoutes } from '@/config/routes' -import { useHeadTags } from '@/hooks/useHeadTags' -import { useSegmentAnalytics } from '@/hooks/useSegmentAnalytics' -import { useUser } from '@/providers/user/user.hooks' -import { useYppStore } from '@/providers/ypp/ypp.store' - -import { YppAuthorizationModal } from './YppAuthorizationModal' -import { Wrapper } from './YppLandingView.styles' -import { YppCardsSections } from './oldSections/YppCardsSections' -import { YppConnectionDetails } from './oldSections/YppConnectionDetails' -import { YppFooter } from './oldSections/YppFooter' -import { YppHero } from './oldSections/YppHero' -import { YppRewardSection } from './oldSections/YppRewardSection' -import { YppSignupVideo } from './oldSections/YppSignupVideo' -import { useGetYppSyncedChannels } from './useGetYppSyncedChannels' - -export const YppLandingViewOld: FC = () => { - const headTags = useHeadTags('YouTube Partner Program') - const yppModalOpenName = useYppStore((state) => state.yppModalOpenName) - const setYppModalOpen = useYppStore((state) => state.actions.setYppModalOpenName) - const { activeMembership, channelId } = useUser() - const { setSelectedChannelId, setShouldContinueYppFlowAfterCreatingChannel } = useYppStore((store) => store.actions) - const navigate = useNavigate() - const { trackYppSignInButtonClick } = useSegmentAnalytics() - const selectedChannelTitle = activeMembership?.channels.find((channel) => channel.id === channelId)?.title - - const [wasSignInTriggered, setWasSignInTriggered] = useState(false) - const shouldContinueYppFlowAfterCreatingChannel = useYppStore( - (store) => store.shouldContinueYppFlowAfterCreatingChannel - ) - - const { unsyncedChannels, isLoading, currentChannel } = useGetYppSyncedChannels() - const isYppSigned = !!currentChannel - const hasAnotherUnsyncedChannel = isYppSigned && !!unsyncedChannels?.length - - useEffect(() => { - AOS.init({ - duration: 750, - once: true, - }) - }, []) - - const handleYppSignUpClick = useCallback(async () => { - if (isYppSigned) { - navigate(absoluteRoutes.studio.yppDashboard()) - return - } - - if (!yppModalOpenName) { - trackYppSignInButtonClick() - setYppModalOpen('ypp-requirements') - return - } - }, [isYppSigned, yppModalOpenName, navigate, trackYppSignInButtonClick, setYppModalOpen]) - - useEffect(() => { - // rerun handleYppSignUpClick after sign in flow - if (wasSignInTriggered) { - handleYppSignUpClick() - setWasSignInTriggered(false) - } - }, [handleYppSignUpClick, wasSignInTriggered]) - - useEffect(() => { - if (shouldContinueYppFlowAfterCreatingChannel) { - setSelectedChannelId(channelId) - setShouldContinueYppFlowAfterCreatingChannel(false) - setYppModalOpen('ypp-requirements') - } - }, [ - channelId, - handleYppSignUpClick, - setSelectedChannelId, - setShouldContinueYppFlowAfterCreatingChannel, - setYppModalOpen, - shouldContinueYppFlowAfterCreatingChannel, - ]) - - const getYppAtlasStatus = () => { - if (isLoading) { - return null - } - - if (!activeMembership?.channels.length) { - return 'no-channel' - } - if (isYppSigned) { - return 'ypp-signed' - } - return 'have-channel' - } - - return ( - - {headTags} - - - - setYppModalOpen('ypp-select-channel')} - onSignUpClick={handleYppSignUpClick} - yppAtlasStatus={getYppAtlasStatus()} - hasAnotherUnsyncedChannel={hasAnotherUnsyncedChannel} - selectedChannelTitle={selectedChannelTitle} - /> - - - - - - - - ) -} diff --git a/packages/atlas/src/views/global/YppLandingView/oldSections/YppCardsSection.styles.ts b/packages/atlas/src/views/global/YppLandingView/oldSections/YppCardsSection.styles.ts deleted file mode 100644 index b70db2d842..0000000000 --- a/packages/atlas/src/views/global/YppLandingView/oldSections/YppCardsSection.styles.ts +++ /dev/null @@ -1,47 +0,0 @@ -import styled from '@emotion/styled' - -import { LayoutGrid } from '@/components/LayoutGrid' -import { media, sizes } from '@/styles' - -import { imageShadow } from '../YppLandingView.styles' - -export const CardsWithImagesContainer = styled.div` - display: grid; - gap: ${sizes(16)}; - ${media.md} { - gap: ${sizes(24)}; - } -` - -export const CardImageRow = styled(LayoutGrid)` - grid-gap: ${sizes(6)}; - ${media.sm} { - align-items: center; - justify-items: center; - } -` - -type ImageContainerProps = { - positionOnMobile?: 'center' | 'unset' | 'flex-end' - /* will prevent overflowing when parallax is applied */ - hiddenOverflow?: boolean -} - -export const ImageContainer = styled.div` - position: relative; - display: flex; - justify-content: ${({ positionOnMobile = 'unset' }) => positionOnMobile}; - ${media.sm} { - overflow: ${({ hiddenOverflow }) => (hiddenOverflow ? 'hidden' : 'unset')}; - justify-content: unset; - } -` - -export const CardImage = styled.img<{ absolute?: boolean; dropShadow?: boolean }>` - width: 100%; - height: auto; - position: ${({ absolute }) => (absolute ? 'absolute' : 'relative')}; - z-index: ${({ absolute }) => (absolute ? 0 : 1)}; - - ${({ dropShadow }) => dropShadow && imageShadow}; -` diff --git a/packages/atlas/src/views/global/YppLandingView/oldSections/YppCardsSections.tsx b/packages/atlas/src/views/global/YppLandingView/oldSections/YppCardsSections.tsx deleted file mode 100644 index 8b2f6b6dd1..0000000000 --- a/packages/atlas/src/views/global/YppLandingView/oldSections/YppCardsSections.tsx +++ /dev/null @@ -1,331 +0,0 @@ -import { FC } from 'react' -import { useParallax } from 'react-scroll-parallax' -import { ParallaxProps } from 'react-scroll-parallax/dist/components/Parallax/types' - -import crt1 from '@/assets/images/illustration-crt-l1.webp' -import crt2 from '@/assets/images/illustration-crt-l2.webp' -import gated1 from '@/assets/images/illustration-gated-l1.webp' -import gated2 from '@/assets/images/illustration-gated-l2.webp' -import tip1 from '@/assets/images/illustration-tip-l1.webp' -import tip2 from '@/assets/images/illustration-tip-l2.webp' -import tip3 from '@/assets/images/illustration-tip-l3.webp' -import videoNfts1 from '@/assets/images/illustration-video-nfts-l1.webp' -import videoNfts2 from '@/assets/images/illustration-video-nfts-l2.webp' -import videoNfts3 from '@/assets/images/illustration-video-nfts-l3.webp' -import videoNfts4 from '@/assets/images/illustration-video-nfts-l4.webp' -import { GridItem } from '@/components/LayoutGrid' -import { Text } from '@/components/Text' -import { ContentCard } from '@/components/_ypp/ContentCard' -import { atlasConfig } from '@/config' -import { useMediaMatch } from '@/hooks/useMediaMatch' -import { useSectionTextVariants } from '@/views/global/YppLandingView/sections/useSectionTextVariants' - -import { CardImage, CardImageRow, CardsWithImagesContainer, ImageContainer } from './YppCardsSection.styles' - -import { - BackgroundContainer, - CenteredLayoutGrid, - HeaderGridItem, - StyledLimitedWidthContainer, -} from '../YppLandingView.styles' - -export const YppCardsSections: FC = () => { - const smMatch = useMediaMatch('sm') - const endScroll = smMatch ? window.innerHeight / 3 : window.innerHeight - const [titleVariant, subtitleVariant] = useSectionTextVariants() - - const commonParallaxOpts: ParallaxProps = { - disabled: !smMatch, - endScroll, - speed: 0.2, - } - - const appName = atlasConfig.general.appName - - return ( - <> - - - - - - - Monetize your ${appName} channel - - - - - Build a foundation for your {appName} channel with syncing YouTube content and tap into the future of - content monetization. - - - - - - - - - - - - - - - - - - - - - - - - - - {/**/} - {/* */} - {/* */} - {/* */} - {/* */} - {/**/} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ) -} - -type CardImageWithParallaxEffectProps = { - src: string - alt: string - dropShadow?: boolean - absolute?: boolean - parallaxProps: ParallaxProps - width?: string - height?: string -} - -const CardImageWithParallaxEffect: FC = ({ - src, - alt, - dropShadow, - parallaxProps, - absolute, - ...rest -}) => { - const { ref: imageRef, controller } = useParallax(parallaxProps) - - // updates cached values after image dimensions have loaded - const handleLoad = () => controller?.update() - return ( - - ) -} diff --git a/packages/atlas/src/views/global/YppLandingView/oldSections/YppConnectionDetails.tsx b/packages/atlas/src/views/global/YppLandingView/oldSections/YppConnectionDetails.tsx deleted file mode 100644 index 918ff4918d..0000000000 --- a/packages/atlas/src/views/global/YppLandingView/oldSections/YppConnectionDetails.tsx +++ /dev/null @@ -1,132 +0,0 @@ -import styled from '@emotion/styled' - -import { SvgActionCheck } from '@/assets/icons' -import { FlexBox } from '@/components/FlexBox' -import { FlexGridItem } from '@/components/LayoutGrid' -import { Text } from '@/components/Text' -import { useMediaMatch } from '@/hooks/useMediaMatch' -import { cVar, media, sizes, square } from '@/styles' -import { - BackgroundContainer, - CenteredLayoutGrid, - HeaderGridItem, - StyledLimitedWidthContainer, -} from '@/views/global/YppLandingView/YppLandingView.styles' -import { useSectionTextVariants } from '@/views/global/YppLandingView/sections/useSectionTextVariants' - -export const YppConnectionDetails = () => { - const mdMatch = useMediaMatch('md') - const smMatch = useMediaMatch('sm') - const [titleVariant, subtitleVariant] = useSectionTextVariants() - - return ( - - - - - - - - - Connecting is{' '} - - Safe - - - - We are verified by the YouTube Safety Team. We can only read specific types of data through the official - API. We cannot publish or change anything on your YouTube channel. - - - - - We can read - - - {[ - 'Channel title, avater, image, sub count, date.', - 'Video titles, views and date.', - 'Account profile.', - ].map((scope, idx) => ( - - - - - - {scope} - - - ))} - - - - - - ) -} - -export const CheckBox = styled.div<{ square: number }>` - background: ${cVar('colorBackgroundSuccess')}; - display: grid; - place-items: center; - padding: ${sizes(2)}; - border-radius: 50%; - width: fit-content; - margin: 0 auto; - ${(props) => square(props.square)}; - - svg { - width: 100%; - height: 100%; - } -` - -const SmallCheckBox = styled.div` - background: ${cVar('colorBackgroundMutedAlpha')}; - border-radius: 50%; - display: grid; - place-items: center; - ${square(32)}; - - svg { - ${square(20)}; - } - - path { - fill: ${cVar('colorTextSuccess')}; - } -` - -const AllowanceBox = styled(FlexGridItem)` - background: ${cVar('colorBackgroundMutedAlpha')}; - border: 1px solid ${cVar('colorBorderMutedAlpha')}; - border-radius: ${cVar('radiusMedium')}; - padding: ${sizes(6)}; - margin: 0 auto; - - ${media.sm} { - padding: ${sizes(8)}; - } -` diff --git a/packages/atlas/src/views/global/YppLandingView/oldSections/YppFooter.styles.ts b/packages/atlas/src/views/global/YppLandingView/oldSections/YppFooter.styles.ts deleted file mode 100644 index 3e20ec69c7..0000000000 --- a/packages/atlas/src/views/global/YppLandingView/oldSections/YppFooter.styles.ts +++ /dev/null @@ -1,36 +0,0 @@ -import styled from '@emotion/styled' - -import bottomLeftPattern from '@/assets/images/ypp-background-pattern.svg' -import topLeftBannerPattern from '@/assets/images/ypp-banner-pattern.svg' -import { GoogleButton } from '@/components/_buttons/GoogleButton' -import { cVar, media, sizes } from '@/styles' - -export const CtaBanner = styled.div` - padding: ${sizes(6)}; - background: ${cVar('colorBackgroundPrimary')}; - text-align: center; - display: flex; - flex-direction: column; - align-items: center; - margin: ${sizes(16)} 0; - border-radius: ${cVar('radiusLarge')}; - - ${media.xs} { - padding: ${sizes(8)}; - } - - ${media.sm} { - background-image: url(${bottomLeftPattern}), url(${topLeftBannerPattern}); - background-position: bottom left, top right; - background-repeat: no-repeat, no-repeat; - padding: ${sizes(16)} ${sizes(12)}; - } - - ${media.md} { - margin: ${sizes(24)} 0; - } -` - -export const StyledButton = styled(GoogleButton)` - margin-top: ${sizes(8)}; -` diff --git a/packages/atlas/src/views/global/YppLandingView/oldSections/YppFooter.tsx b/packages/atlas/src/views/global/YppLandingView/oldSections/YppFooter.tsx deleted file mode 100644 index 1edcdb006f..0000000000 --- a/packages/atlas/src/views/global/YppLandingView/oldSections/YppFooter.tsx +++ /dev/null @@ -1,68 +0,0 @@ -import { FC, ReactElement } from 'react' - -import { SvgActionInfo, SvgActionSpeech, SvgActionTokensStack } from '@/assets/icons' -import { GridItem, LayoutGrid } from '@/components/LayoutGrid' -import { Text } from '@/components/Text' -import { CallToActionButton, CallToActionWrapper } from '@/components/_buttons/CallToActionButton' -import { atlasConfig } from '@/config' -import { YppWidgetIcons } from '@/config/configSchema' -import { useSectionTextVariants } from '@/views/global/YppLandingView/sections/useSectionTextVariants' - -import { CtaBanner, StyledButton } from './YppFooter.styles' - -import { StyledLimitedWidthContainer } from '../YppLandingView.styles' - -export const configYppIconMapper: Record = { - info: , - message: , - tokenStack: , -} - -type YppFooterSectionProps = { - onSignUpClick: () => void -} - -export const YppFooter: FC = ({ onSignUpClick }) => { - const [titleVariant] = useSectionTextVariants() - - return ( - <> - - - - - - Get started now - - - Pave the way to Web3 with your YouTube channel right away. - - - Authorize with YouTube - - - - - {atlasConfig.features.ypp.widgets && ( - - {atlasConfig.features.ypp.widgets.map((widget) => ( - - ))} - - )} - - ) -} diff --git a/packages/atlas/src/views/global/YppLandingView/oldSections/YppHero.styles.ts b/packages/atlas/src/views/global/YppLandingView/oldSections/YppHero.styles.ts deleted file mode 100644 index 8f29f25b97..0000000000 --- a/packages/atlas/src/views/global/YppLandingView/oldSections/YppHero.styles.ts +++ /dev/null @@ -1,71 +0,0 @@ -import styled from '@emotion/styled' - -import { InfiniteCarousel } from '@/components/InfiniteCarousel/InfiniteCarousel' -import { cVar, media, sizes } from '@/styles' - -import { imageShadow } from '../YppLandingView.styles' - -export const HeroImageWrapper = styled.div` - position: relative; - margin: ${sizes(16)} auto 0 auto; - - ${media.lg} { - max-width: 1082px; - } -` - -export const ButtonWrapper = styled.div` - display: flex; - justify-content: center; -` - -export const LogosContainer = styled.div` - display: flex; - align-items: center; - justify-content: center; - gap: ${sizes(10)}; - margin-bottom: ${sizes(6)}; -` - -export const SelectDifferentChannelButton = styled.button` - white-space: normal; - border: none; - background: none; - color: ${cVar('colorTextPrimary')}; - padding: 0; - font: inherit; - cursor: pointer; - - :hover, - :focus-visible { - text-decoration: underline; - } -` - -export const FrontImage = styled.img` - width: 100%; - max-width: 100%; - height: auto; - display: block; - border-radius: ${cVar('radiusMedium')}; - margin-top: 10%; - ${imageShadow} -` - -export const BackImage = styled.img` - position: absolute; - width: 80%; - max-width: 100%; - height: auto; - display: block; - left: 10%; - top: -10%; - border-radius: ${cVar('radiusMedium')}; -` - -export const StyledInfiniteCarousel = styled(InfiniteCarousel)` - margin-top: ${sizes(16)}; - ${media.md} { - margin-top: ${sizes(24)}; - } -` diff --git a/packages/atlas/src/views/global/YppLandingView/oldSections/YppHero.tsx b/packages/atlas/src/views/global/YppLandingView/oldSections/YppHero.tsx deleted file mode 100644 index 6a064b4b53..0000000000 --- a/packages/atlas/src/views/global/YppLandingView/oldSections/YppHero.tsx +++ /dev/null @@ -1,194 +0,0 @@ -import { FC } from 'react' -import { useParallax } from 'react-scroll-parallax' -import { CSSTransition, SwitchTransition } from 'react-transition-group' -import useResizeObserver from 'use-resize-observer' - -import { useMostPaidChannels } from '@/api/hooks/channel' -import { SvgActionChevronR, SvgLogoGoogleWhiteFull, SvgLogoYoutubeWhiteFull } from '@/assets/icons' -import hero from '@/assets/images/ypp-hero/hero.webp' -import yt from '@/assets/images/ypp-hero/yt.webp' -import { AppLogo } from '@/components/AppLogo' -import { GridItem, LayoutGrid } from '@/components/LayoutGrid' -import { Text } from '@/components/Text' -import { Button } from '@/components/_buttons/Button' -import { GoogleButton } from '@/components/_buttons/GoogleButton' -import { PaidChannelCard } from '@/components/_channel/ChannelCard' -import { SkeletonLoader } from '@/components/_loaders/SkeletonLoader' -import { atlasConfig } from '@/config' -import { useMediaMatch } from '@/hooks/useMediaMatch' -import { cVar, transitions } from '@/styles' -import { useSectionTextVariants } from '@/views/global/YppLandingView/sections/useSectionTextVariants' - -import { - BackImage, - ButtonWrapper, - FrontImage, - HeroImageWrapper, - LogosContainer, - SelectDifferentChannelButton, - StyledInfiniteCarousel, -} from './YppHero.styles' - -import { - GlowBox, - GlowContainer, - HeroBackgroundContainer, - StyledLimitedWidthContainerHero, -} from '../YppLandingView.styles' - -export type YppAtlasStatus = 'have-channel' | 'no-channel' | 'ypp-signed' | 'connect-wallet' | null - -type YppHeroProps = { - onSignUpClick: () => void - onSelectChannel: () => void - yppAtlasStatus: YppAtlasStatus - hasAnotherUnsyncedChannel?: boolean - selectedChannelTitle?: string | null -} - -export const YppHero: FC = ({ - onSignUpClick, - onSelectChannel, - yppAtlasStatus, - hasAnotherUnsyncedChannel, - selectedChannelTitle, -}) => { - const smMatch = useMediaMatch('sm') - const { ref, width, height } = useResizeObserver({ box: 'border-box' }) - const [, subtitleVariant, titleVariant] = useSectionTextVariants() - const endScroll = smMatch ? window.innerHeight / 3 : window.innerHeight - const { ref: heroImageRef } = useParallax({ - startScroll: 0, - endScroll, - translateY: [0, -15], - }) - - const { channels, loading } = useMostPaidChannels() - const items = !loading - ? channels?.map((channel) => ) - : Array.from({ length: 30 }).map((_, idx) => ) - - return ( - - - - - - - - - - - - Connect your YouTube channel & get paid - - - - - YouTube videos get automatically synced to your {atlasConfig.general.appName} channel, without any - additional effort. - - - - - - - - - - - - {yppAtlasStatus ? ( - yppAtlasStatus === 'ypp-signed' ? ( - - ) : ( - - ) - ) : ( - - )} - - - - - - - - - {hasAnotherUnsyncedChannel && selectedChannelTitle && ( - <> - Your channel "{selectedChannelTitle}" is already part of the YouTube Partner Program.{' '} - - Select a different channel - {' '} - to apply again. - - )} - {yppAtlasStatus !== 'ypp-signed' && 'It takes under 1 minute and is 100% free.'} - - - - - - - - - {items && items.length >= 7 && ( - - )} - - ) -} diff --git a/packages/atlas/src/views/global/YppLandingView/oldSections/YppRewardSection.styles.ts b/packages/atlas/src/views/global/YppLandingView/oldSections/YppRewardSection.styles.ts deleted file mode 100644 index 4f74261f00..0000000000 --- a/packages/atlas/src/views/global/YppLandingView/oldSections/YppRewardSection.styles.ts +++ /dev/null @@ -1,58 +0,0 @@ -import styled from '@emotion/styled' - -import { GridItem } from '@/components/LayoutGrid' -import { Button } from '@/components/_buttons/Button' -import { cVar, media, sizes } from '@/styles' -import { Anchor } from '@/views/global/YppLandingView/YppAuthorizationModal/YppAuthorizationModal.styles' - -export const BenefitsCardButton = styled(Button)` - border-radius: 999px; -` - -export const BenefitsCardsButtonsGroup = styled.div` - text-align: center; - display: grid; - overflow-x: auto; - white-space: nowrap; - margin: ${sizes(16)} 0 ${sizes(8)} 0; - - ::-webkit-scrollbar { - display: none; - } - - gap: ${sizes(2)}; - - ${media.sm} { - grid-template-columns: repeat(2, 1fr); - } - - ${media.md} { - grid-template-columns: repeat(3, 1fr); - } - - ${media.lg} { - grid-template-columns: repeat(6, 1fr); - } -` - -export const BenefitsCardsContainerGridItem = styled(GridItem)` - display: grid; - gap: ${sizes(2)}; -` - -export const ColorAnchor = styled(Anchor)` - color: ${cVar('colorTextPrimary')}; -` - -export const RewardsSubtitleGridItem = styled(GridItem)` - display: grid; - gap: ${sizes(4)}; - margin-top: ${sizes(8)}; -` - -export const RewardsSubtitleWrapper = styled.div` - display: flex; - flex-direction: row; - align-items: center; - justify-content: flex-end; -` diff --git a/packages/atlas/src/views/global/YppLandingView/oldSections/YppRewardSection.tsx b/packages/atlas/src/views/global/YppLandingView/oldSections/YppRewardSection.tsx deleted file mode 100644 index b1b2907e96..0000000000 --- a/packages/atlas/src/views/global/YppLandingView/oldSections/YppRewardSection.tsx +++ /dev/null @@ -1,134 +0,0 @@ -import { FC, useRef } from 'react' - -import { Information } from '@/components/Information' -import { FlexGridItem, GridItem, LayoutGrid } from '@/components/LayoutGrid' -import { Text } from '@/components/Text' -import { TooltipText } from '@/components/Tooltip/Tooltip.styles' -import { TierCard } from '@/components/_ypp/TierCard' -import { atlasConfig } from '@/config' -import { useMediaMatch } from '@/hooks/useMediaMatch' -import { getTierRewards } from '@/utils/ypp' -import { useSectionTextVariants } from '@/views/global/YppLandingView/sections/useSectionTextVariants' - -import { ColorAnchor } from './YppRewardSection.styles' - -import { - BackgroundContainer, - CenteredLayoutGrid, - RewardsSubText, - StyledLimitedWidthContainer, - TierCardWrapper, -} from '../YppLandingView.styles' - -export const calculateReward = ( - amount: number | number[] | { min: number | null; max: number } | null, - multiplier: number | number[], - tier: number -) => { - if (amount === null) { - return null - } else if (typeof amount === 'number') { - return { - type: 'number' as const, - amount: amount * (typeof multiplier === 'number' ? multiplier : multiplier[tier]), - } - } else if (Array.isArray(amount)) { - return { - type: 'number' as const, - amount: amount[tier], - } - } else { - return { type: 'range' as const, min: amount.min, max: amount.max } - } -} - -export const YppRewardSection: FC = () => { - const mdMatch = useMediaMatch('md') - const tiers = atlasConfig.features.ypp.tiersDefinition - const [titleVariant, subtitleVariant] = useSectionTextVariants() - const ref = useRef(null) - - if (!tiers?.length) { - return null - } - - return ( - - - - - - Rewards based on quality and popularity - - - - - Each participating channel is reviewed by the verification team and assigned to one of the reward tiers - below - - - - - - {tiers.map((tier) => { - const signupMultiplier = tier.tier === 'bronze' ? 1 : atlasConfig.features.ypp.tierBoostMultiplier || 1 - const referralMultiplier = atlasConfig.features.ypp.tierBoostMultiplier || 1 - const modifiedRewards = [ - tier.rewards[0] * signupMultiplier, - tier.rewards[1], - (getTierRewards('diamond')?.referral || 0) * referralMultiplier, - ] - return - })} - - *Referral rewards depend on the tier of the invited channel. - - - - - Payments are made in {atlasConfig.joystream.tokenTicker} tokens - - - {atlasConfig.joystream.tokenTicker} token is a native crypto asset of Joystream blockchain which - powers {atlasConfig.general.appName}. It is used for trading Creator Tokens, NFTs and covering - blockchain processing fees. It is also used for voting on proposals and partaking in council - elections.{' '} - - Purchase {atlasConfig.joystream.tokenTicker} - - - } - multiline - reference={ref.current} - /> - - - - - ) -} diff --git a/packages/atlas/src/views/global/YppLandingView/oldSections/YppSignupVideo.tsx b/packages/atlas/src/views/global/YppLandingView/oldSections/YppSignupVideo.tsx deleted file mode 100644 index d43a96c59f..0000000000 --- a/packages/atlas/src/views/global/YppLandingView/oldSections/YppSignupVideo.tsx +++ /dev/null @@ -1,73 +0,0 @@ -import styled from '@emotion/styled' - -import { GridItem } from '@/components/LayoutGrid' -import { Text } from '@/components/Text' -import { SkeletonLoader } from '@/components/_loaders/SkeletonLoader' -import { useMediaMatch } from '@/hooks/useMediaMatch' -import { - BackgroundContainer, - CenteredLayoutGrid, - StyledLimitedWidthContainerVideo, -} from '@/views/global/YppLandingView/YppLandingView.styles' -import { useSectionTextVariants } from '@/views/global/YppLandingView/sections/useSectionTextVariants' - -export const YppSignupVideo = () => { - const mdMatch = useMediaMatch('md') - const [titleVariant, subtitleVariant] = useSectionTextVariants() - - return ( - - - - - - Sign up in 60 seconds - - - Watch the sign up demo by one of Joystream members. - - - - - - - - - - - ) -} - -const PlayerContainer = styled.div` - width: 100%; - position: relative; - aspect-ratio: 16/9; -` - -export const PlayerSkeletonLoader = styled(SkeletonLoader)` - position: absolute; - top: 0; -` - -const IframeVideo = styled.iframe` - border: none; - width: 640px; - height: 364px; - max-width: 100%; - max-height: 55vw; -` diff --git a/packages/atlas/src/views/viewer/ViewerLayout.tsx b/packages/atlas/src/views/viewer/ViewerLayout.tsx index 7914ca6633..2069d02a3b 100644 --- a/packages/atlas/src/views/viewer/ViewerLayout.tsx +++ b/packages/atlas/src/views/viewer/ViewerLayout.tsx @@ -22,12 +22,8 @@ import { useUser } from '@/providers/user/user.hooks' import { media, transitions } from '@/styles' import { RoutingState } from '@/types/routing' -// Currently the newest version is at main file and the old one was moved to new file -const YppLandingViewTest = lazy(() => - import('@/views/global/YppLandingView').then((module) => ({ default: module.YppLandingView })) -) const YppLandingView = lazy(() => - import('@/views/global/YppLandingView/YppLandingViewOld').then((module) => ({ default: module.YppLandingViewOld })) + import('@/views/global/YppLandingView').then((module) => ({ default: module.YppLandingView })) ) const MemberNotificationsView = lazy(() => import('@/views/notifications').then((module) => ({ default: module.MemberNotificationsView })) @@ -70,10 +66,7 @@ const viewerRoutes = [ { path: relativeRoutes.viewer.crtMarketplace(), element: }, { path: relativeRoutes.viewer.nftMarketplace(), element: }, ...(atlasConfig.features.ypp.googleConsoleClientId - ? [ - { path: relativeRoutes.viewer.ypp(), element: }, - { path: relativeRoutes.viewer.yppTest(), element: }, - ] + ? [{ path: relativeRoutes.viewer.ypp(), element: }] : []), { path: relativeRoutes.viewer.referrals(), element: }, ]