From 1f0db51a20c7c0bd195947241e4ed2298a22e52e Mon Sep 17 00:00:00 2001 From: ikprk <168457495+ikprk@users.noreply.github.com> Date: Tue, 4 Jun 2024 14:53:31 +0200 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=94=A5=20Skip=20metadata=20update=20o?= =?UTF-8?q?n=20internal=20account=20(#54)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/_comments/Comment/InternalComment.tsx | 9 +++------ .../src/providers/transactions/transactions.hooks.ts | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/atlas/src/components/_comments/Comment/InternalComment.tsx b/packages/atlas/src/components/_comments/Comment/InternalComment.tsx index cec6e9e9fa..c9ba62879a 100644 --- a/packages/atlas/src/components/_comments/Comment/InternalComment.tsx +++ b/packages/atlas/src/components/_comments/Comment/InternalComment.tsx @@ -98,7 +98,6 @@ export const InternalComment: FC = ({ onEditClick, onDeleteClick, onReactionClick, - onOnBoardingPopoverOpen, reactions, onReplyClick, replyAvatars, @@ -169,15 +168,13 @@ export const InternalComment: FC = ({ const handleCommentReactionClick = useCallback( async (reactionId: CommentReaction) => { + onReactionClick?.(reactionId) + if (!reactionPopoverDismissed) { - setTempReactionId(reactionId) - await onOnBoardingPopoverOpen?.(reactionId) popoverRef.current?.show() - } else { - onReactionClick?.(reactionId) } }, - [onOnBoardingPopoverOpen, onReactionClick, reactionPopoverDismissed] + [onReactionClick, reactionPopoverDismissed] ) const sortedReactions = reactions && [...reactions].sort((a, b) => (b.count || 0) - (a.count || 0)) diff --git a/packages/atlas/src/providers/transactions/transactions.hooks.ts b/packages/atlas/src/providers/transactions/transactions.hooks.ts index 2ed5db69d2..b06e1f75a4 100644 --- a/packages/atlas/src/providers/transactions/transactions.hooks.ts +++ b/packages/atlas/src/providers/transactions/transactions.hooks.ts @@ -87,7 +87,7 @@ export const useTransaction = (): HandleTransactionFn => { return false } - if (isSignerMetadataOutdated && WALLETS_WITH_METADATA.includes(wallet?.extensionName ?? '')) { + if (isSignerMetadataOutdated && wallet?.extensionName && WALLETS_WITH_METADATA.includes(wallet.extensionName)) { await new Promise((resolve) => { openOngoingTransactionModal({ title: 'Update Wallet Metadata', From de5347a853a3f990d240f856e835ae07bba9e06b Mon Sep 17 00:00:00 2001 From: ikprk <168457495+ikprk@users.noreply.github.com> Date: Wed, 26 Jun 2024 12:53:30 +0200 Subject: [PATCH 2/2] :fire: Hotfix: Remove dropped rewards tasks (#55) * Remove some tasks from ypp dashboard * Remove extra tooltip from membership dropdown * Add nft and crt marketplace to segment --- .../MemberDropdown/BalanceTooltip.tsx | 76 ++-- .../YppDashboard/tabs/YppDashboardMainTab.tsx | 338 ++++++++++-------- .../atlas/src/views/viewer/ViewerLayout.tsx | 5 +- 3 files changed, 223 insertions(+), 196 deletions(-) diff --git a/packages/atlas/src/components/_overlays/MemberDropdown/BalanceTooltip.tsx b/packages/atlas/src/components/_overlays/MemberDropdown/BalanceTooltip.tsx index ed85581d6e..137bb30b42 100644 --- a/packages/atlas/src/components/_overlays/MemberDropdown/BalanceTooltip.tsx +++ b/packages/atlas/src/components/_overlays/MemberDropdown/BalanceTooltip.tsx @@ -1,13 +1,10 @@ import BN from 'bn.js' import { FC, PropsWithChildren } from 'react' -import { SvgActionInformative } from '@/assets/icons' -import { JoyTokenIcon } from '@/components/JoyTokenIcon' -import { NumberFormat } from '@/components/NumberFormat' -import { Text } from '@/components/Text' import { Tooltip } from '@/components/Tooltip' - -import { TextWithIcon, TooltipFooter, TooltipRow, TooltipWrapper, UpperRow } from './BalanceTooltip.styles' +import { TooltipText } from '@/components/Tooltip/Tooltip.styles' +import { atlasConfig } from '@/config' +import { ColorAnchor } from '@/views/global/YppLandingView/sections/YppRewardSection.styles' type BalanceTooltipProps = PropsWithChildren<{ accountBalance: BN | undefined @@ -17,7 +14,7 @@ type BalanceTooltipProps = PropsWithChildren<{ export const BalanceTooltip: FC = ({ accountBalance, - lockedAccountBalance = new BN(0), + // lockedAccountBalance = new BN(0), containerRefElement, children, }) => { @@ -33,34 +30,43 @@ export const BalanceTooltip: FC = ({ placement="bottom" delay={[250, 0]} customContent={ - - - - - Spendable - - - - - - - - - - - Your transferable balance is zero, meaning you cannot buy NFTs or transfer tokens. There is a spendable - balance from faucet, which you can still spend on paying transaction fees for creating channels, posting - videos, adding comments and reactions. This balance needs to be repaid before accumulating transferable - balance. - - - + + {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} + + + + // + // + // + // + // Spendable + // + // + // + // + // + // + // + // + // + // + // Your transferable balance is zero, meaning you cannot buy NFTs or transfer tokens. There is a spendable + // balance from faucet, which you can still spend on paying transaction fees for creating channels, posting + // videos, adding comments and reactions. This balance needs to be repaid before accumulating transferable + // balance. + // + // + // } > {children} diff --git a/packages/atlas/src/views/studio/YppDashboard/tabs/YppDashboardMainTab.tsx b/packages/atlas/src/views/studio/YppDashboard/tabs/YppDashboardMainTab.tsx index 878385d982..b2a57e86dd 100644 --- a/packages/atlas/src/views/studio/YppDashboard/tabs/YppDashboardMainTab.tsx +++ b/packages/atlas/src/views/studio/YppDashboard/tabs/YppDashboardMainTab.tsx @@ -21,15 +21,14 @@ import { Button, TextButton } from '@/components/_buttons/Button' import { BenefitCard } from '@/components/_ypp/BenefitCard' import { ReferralLinkButton } from '@/components/_ypp/ReferralLinkButton' import { ServiceStatusWidget } from '@/components/_ypp/ServiceStatusWidget/ServiceStatusWidget' -import { YppDashboardTier, getTierIcon } from '@/components/_ypp/YppDashboardTier' -import { TierWrapper } from '@/components/_ypp/YppDashboardTier/YppDashboardTier.styles' +import { YppDashboardTier } from '@/components/_ypp/YppDashboardTier' import { atlasConfig } from '@/config' import { absoluteRoutes } from '@/config/routes' import { useMediaMatch } from '@/hooks/useMediaMatch' import { useSegmentAnalytics } from '@/hooks/useSegmentAnalytics' import { useYppAuthorizeHandler } from '@/hooks/useYppAuthorizeHandler' import { useUser } from '@/providers/user/user.hooks' -import { cVar, sizes, square, transitions } from '@/styles' +import { cVar, sizes, transitions } from '@/styles' import { formatDate, getNextWeekday } from '@/utils/time' import { BOOST_TIMESTAMP, getTierRewards, yppBackendTierToConfig } from '@/utils/ypp' import { YppAuthorizationModal } from '@/views/global/YppLandingView/YppAuthorizationModal' @@ -105,12 +104,12 @@ export const YppDashboardMainTab: FC = () => { const { trackAmbassadorLinkClicked, trackRewardsReferralLinkClicked, - trackRewardsBrandingLinkClicked, - trackRewardsOriginalCreatorsLinkClicked, + // trackRewardsBrandingLinkClicked, + // trackRewardsOriginalCreatorsLinkClicked, trackTwitterPostLinkClicked, - trackShareNftLinkClicked, + // trackShareNftLinkClicked, trackJoinDiscordLinkClicked, - trackShareTokenLinkClicked, + // trackShareTokenLinkClicked, trackRoundtableEventsClicked, } = useSegmentAnalytics() const navigate = useNavigate() @@ -129,7 +128,7 @@ export const YppDashboardMainTab: FC = () => { const isSilverOrAbove = ['Verified::Silver', 'Verified::Gold', 'Verified::Diamond'].includes( currentChannel?.yppStatus ?? '' ) - const isBronze = currentChannel?.yppStatus === 'Verified::Bronze' + // const isBronze = currentChannel?.yppStatus === 'Verified::Bronze' const handleYppSignUpClick = () => { const success = _handleYppSignUpClick() if (success) { @@ -157,17 +156,17 @@ export const YppDashboardMainTab: FC = () => { ) - const silverTierGroup = ( - - {getTierIcon('Verified::Silver')} - - Offers are valid for silver tiers and above. - - {!isBronze ? ( - - ) : null} - - ) + // const silverTierGroup = ( + // + // {getTierIcon('Verified::Silver')} + // + // Offers are valid for silver tiers and above. + // + // {!isBronze ? ( + // + // ) : null} + // + // ) return ( <> @@ -409,137 +408,6 @@ export const YppDashboardMainTab: FC = () => { } /> - - - - {isSilverOrAbove ? null : silverTierGroup} - - - {currentChannel?.yppStatus - ? (getTierRewards(yppBackendTierToConfig(currentChannel.yppStatus))?.videoSync || 0) * 5 - : 'Up to 25'}{' '} - USD - - - per video - - - } - rewardTooltip={ - - Original content published to {atlasConfig.general.appName} is rewarded at a multiple. We are gathering - applicants for the beta testing of this feature. Apply early for higher multiples.{'\n'} - Learn more - - } - actionNode={ - - } - /> - - - {currentChannel?.yppStatus - ? (getTierRewards(yppBackendTierToConfig(currentChannel.yppStatus))?.videoSync || 0) * 5 - : 'Up to 25'}{' '} - USD - - - per video - - - } - rewardTooltip={ - - Using branded assets as a preroll for your videos published to {atlasConfig.general.appName} first allow - to maximise the rewards. We are gathering early applicants for the beta test of this feature. Apply - early to get higher multiple.{' '} - Learn more - - } - actionNode={ - - } - /> - - - - {isSilverOrAbove ? null : silverTierGroup} - - Share NFT from Gleev on social media of your choice and drop the link of your post to{' '} - #shared-NFTs on Discord to - participate in rewards. - - } - rewardTooltip={ - - Promote your NFTs on social media and get rewarded by the DAO for this. Rewards assigned are based on - peer upvotes held in a dedicated Discord channel.{'\n'} - Learn more - - } - actionNode={ - - } - /> - - Share your CRT page from Gleev on social media of your choice and drop the link of your post to{' '} - #shared-CRTs on Discord to - participate in rewards. - - } - rewardTooltip={ - - Promote your Creator Token on social media and get rewarded by the DAO for this. Rewards assigned are - based on peer upvotes held in a dedicated Discord channel.{'\n'} - Learn more - - } - actionNode={ - - } - /> { /> + {/* */} + {/* {isSilverOrAbove ? null : silverTierGroup} */} + {/* */} + {/* */} + {/* {currentChannel?.yppStatus */} + {/* ? (getTierRewards(yppBackendTierToConfig(currentChannel.yppStatus))?.videoSync || 0) * 5 */} + {/* : 'Up to 25'}{' '} */} + {/* USD */} + {/* */} + {/* */} + {/* per video */} + {/* */} + {/* */} + {/* } */} + {/* rewardTooltip={ */} + {/* */} + {/* Original content published to {atlasConfig.general.appName} is rewarded at a multiple. We are gathering */} + {/* applicants for the beta testing of this feature. Apply early for higher multiples.{'\n'} */} + {/* Learn more */} + {/* */} + {/* } */} + {/* actionNode={ */} + {/* */} + {/* } */} + {/* /> */} + {/* */} + {/* */} + {/* {currentChannel?.yppStatus */} + {/* ? (getTierRewards(yppBackendTierToConfig(currentChannel.yppStatus))?.videoSync || 0) * 5 */} + {/* : 'Up to 25'}{' '} */} + {/* USD */} + {/* */} + {/* */} + {/* per video */} + {/* */} + {/* */} + {/* } */} + {/* rewardTooltip={ */} + {/* */} + {/* Using branded assets as a preroll for your videos published to {atlasConfig.general.appName} first allow */} + {/* to maximise the rewards. We are gathering early applicants for the beta test of this feature. Apply */} + {/* early to get higher multiple.{' '} */} + {/* Learn more */} + {/* */} + {/* } */} + {/* actionNode={ */} + {/* */} + {/* } */} + {/* /> */} + {/* */} + + {/* */} + {/* {isSilverOrAbove ? null : silverTierGroup} */} + {/* */} + {/* Share NFT from Gleev on social media of your choice and drop the link of your post to{' '} */} + {/* #shared-NFTs on Discord to */} + {/* participate in rewards. */} + {/* */} + {/* } */} + {/* rewardTooltip={ */} + {/* */} + {/* Promote your NFTs on social media and get rewarded by the DAO for this. Rewards assigned are based on */} + {/* peer upvotes held in a dedicated Discord channel.{'\n'} */} + {/* Learn more */} + {/* */} + {/* } */} + {/* actionNode={ */} + {/* */} + {/* } */} + {/* /> */} + {/* */} + {/* Share your CRT page from Gleev on social media of your choice and drop the link of your post to{' '} */} + {/* #shared-CRTs on Discord to */} + {/* participate in rewards. */} + {/* */} + {/* } */} + {/* rewardTooltip={ */} + {/* */} + {/* Promote your Creator Token on social media and get rewarded by the DAO for this. Rewards assigned are */} + {/* based on peer upvotes held in a dedicated Discord channel.{'\n'} */} + {/* Learn more */} + {/* */} + {/* } */} + {/* actionNode={ */} + {/* */} + {/* } */} + {/* /> */} + {/* */} + {/* Ambassador program is open for creators dedicated to Joystream and entails versatile tasks of your */} + {/* choice for collaboration and promotion.{'\n'} */} + {/* Learn more */} + {/* */} + {/* } */} + {/* actionNode={ */} + {/* */} + {/* } */} + {/* /> */} + {/* */} + @@ -583,15 +603,15 @@ const HelpContainer = styled(FlexBox)` padding: ${sizes(4)} 0; ` -const SilverTierWrapper = styled(TierWrapper)` - padding: ${sizes(2)}; - width: fit-content; - border: 1px solid #cbe0f145; - - svg { - ${square(20)}; - } -` +// const SilverTierWrapper = styled(TierWrapper)` +// padding: ${sizes(2)}; +// width: fit-content; +// border: 1px solid #cbe0f145; +// +// svg { +// ${square(20)}; +// } +// ` export const BenefitsContainer = ({ children, title }: { children: ReactNode[] | ReactNode; title: string }) => { const drawer = useRef(null) diff --git a/packages/atlas/src/views/viewer/ViewerLayout.tsx b/packages/atlas/src/views/viewer/ViewerLayout.tsx index 2069d02a3b..635d257121 100644 --- a/packages/atlas/src/views/viewer/ViewerLayout.tsx +++ b/packages/atlas/src/views/viewer/ViewerLayout.tsx @@ -84,7 +84,8 @@ const locationToPageName = { '/membership/edit': 'Edit membership', '/member/': 'Member', '/notifications': 'Notifications', - '/marketplace': 'Marketplace', + '/crt-marketplace': 'CRT Marketplace', + '/nft-marketplace': 'NFT Marketplace', '/portfolio': 'Portfolio', '/ypp': 'YPP landing page', '/ypp-dashboard': 'YPP Dashboard', @@ -221,7 +222,7 @@ const MiscUtils = () => { : Object.entries(locationToPageName).find(([key]) => location.pathname.includes(key))?.[1] //pages below will be tracked by the view components in order to include the additional params - if (['Channel', 'Category', 'Video', 'Marketplace'].some((page) => pageName?.includes(page))) { + if (['Channel', 'Category', 'Video'].some((page) => pageName?.includes(page))) { return } const [query, referrerChannel, utmSource, utmCampaign, utmContent, gState, gCode] = [