Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update airdrop copy and add X icon #11306

Merged
merged 4 commits into from
Feb 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/rich-peaches-rhyme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@audius/harmony": minor
---

Add X icon
11 changes: 8 additions & 3 deletions packages/common/src/utils/challenges.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { formatNumberCommas } from './formatUtil'

export type ChallengeRewardsInfo = {
id: ChallengeRewardID
shortTitle?: string
title: string
description: (amount: OptimisticUserChallenge | undefined) => string
fullDescription?: (amount: OptimisticUserChallenge | undefined) => string
Expand Down Expand Up @@ -307,9 +308,13 @@ export const challengeRewardsConfig: Record<
id: 'trending-underground'
},
o: {
title: 'Airdrop - Februrary 2025',
description: () => 'Claim your $AUDIO before it expires!',
fullDescription: () => 'Claim your $AUDIO before it expires!',
shortTitle: 'Airdrop 2: Artists',
title: 'Airdrop 2: Artist Appreciationdfa',
description: () =>
`We're thrilled to reward our talented artist community for driving Audius' growth and success!`,
fullDescription: () =>
`We're thrilled to reward our talented artist community for driving Audius' growth and success! \n\nClaim your tokens before they expire on 05/13/25!`,

panelButtonText: '',
id: ChallengeName.OneShot,
remainingLabel: 'Ineligible',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class ChallengeReward extends BaseNotification<ChallengeRewardRow> {
amount: 2
},
o: {
title: 'Airdrop - February 2025'
title: 'Airdrop 2: Artist Appreciation'
}
}

Expand Down
5 changes: 5 additions & 0 deletions packages/harmony/src/assets/icons/X.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/harmony/src/icons/Logos.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ Logos are used as a visual representation of our brand and other businesses we p
<IconFacebook />
<IconInstagram />
<IconTwitter />
<IconX />
<IconTelegram />
<IconSnapChat />
<IconTikTok />
Expand Down
2 changes: 2 additions & 0 deletions packages/harmony/src/icons/logos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import IconSnapChatSVG from '../assets/icons/SnapChat.svg'
import IconTelegramSVG from '../assets/icons/Telegram.svg'
import IconTikTokSVG from '../assets/icons/TikTok.svg'
import IconTwitterSVG from '../assets/icons/Twitter.svg'
import IconXSVG from '../assets/icons/X.svg'
import { createImageIcon } from '../utils/createImageIcon'

export const IconAudiusLogo = IconAudiusLogoSVG as IconComponent
Expand Down Expand Up @@ -64,3 +65,4 @@ export const IconSnapChat = IconSnapChatSVG as IconComponent
export const IconTelegram = IconTelegramSVG as IconComponent
export const IconTikTok = IconTikTokSVG as IconComponent
export const IconTwitter = IconTwitterSVG as IconComponent
export const IconX = IconXSVG as IconComponent
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ export const ChallengeRewardsDrawerProvider = () => {
onClose={handleClose}
isFullscreen
isGestureSupported={false}
title={config.title}
title={config.shortTitle ?? config.title}
>
{isAudioMatchingChallenge(modalType) ? (
<AudioMatchingChallengeDrawerContent
Expand All @@ -232,7 +232,11 @@ export const ChallengeRewardsDrawerProvider = () => {
/>
) : (
<ChallengeRewardsDrawerContent
description={config.description(challenge)}
description={
config.fullDescription
? config.fullDescription(challenge)
: config.description(challenge)
}
progressLabel={config.progressLabel ?? 'Completed'}
completedLabel={config.completedLabel}
amount={progressRewardAmount}
Expand Down
3 changes: 2 additions & 1 deletion packages/mobile/src/screens/rewards-screen/Panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ type PanelProps = {
export const Panel = ({
id,
onPress,
shortTitle,
title,
shortDescription,
description,
Expand Down Expand Up @@ -94,7 +95,7 @@ export const Panel = ({
</Flex>
<Flex ph='unit5' gap='s'>
<Text variant='heading' size='s'>
{title}
{shortTitle ?? title}
</Text>
<Text numberOfLines={2}>
{shortDescription || description(challenge)}
Expand Down
1 change: 1 addition & 0 deletions packages/mobile/src/utils/challenges.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export type ChallengesParamList = {

export type MobileChallengeConfig = {
icon?: ImageSourcePropType
shortTitle?: string
title?: string
description?: (amount?: OptimisticUserChallenge) => string
shortDescription?: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,9 @@ const ChallengeRewardsBody = ({ dismissModal }: BodyProps) => {
{messages.verifiedChallenge}
</div>
) : null}
<Text variant='body'>{fullDescription?.(challenge)}</Text>
<Text variant='body' style={{ whiteSpace: 'pre-line' }}>
{fullDescription?.(challenge)}
</Text>
{isCooldownChallenge ? (
<Text variant='body' color='subdued'>
{messages.cooldownDescription}
Expand Down