Skip to content

Commit

Permalink
feat: enable campaign for iota profiles (#2563)
Browse files Browse the repository at this point in the history
* feat: enable campaign for iota prfiles

* show tooltip on campaigns network badge

---------

Co-authored-by: Nicole O'Brien <[email protected]>
  • Loading branch information
jeeanribeiro and nicole-obrien authored May 29, 2024
1 parent 27b1e50 commit cd76870
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
import { ICampaign } from '@contexts/campaigns'
import { openUrlInBrowser } from '@core/app'
import { TIDE_BASE_URL, TideWebsiteEndpoint } from '@core/tide'
import Pane from '@ui/atoms/Pane.svelte'
import { Pane, NetworkAvatar } from '@ui'
import { MediaPlaceholder } from '@ui/molecules'
import CampaignParticipantsPill from './CampaignParticipantsPill.svelte'
import CampaignRewardsPill from './CampaignRewardsPill.svelte'
import CampaignStatusPill from './CampaignStatusPill.svelte'
import CampaignTimestampPill from './CampaignTimestampPill.svelte'
import sanitizeHtml from 'sanitize-html'
import { NetworkNamespace } from '@core/network'
import { localize } from '@core/i18n'
import CampaignUsersPill from './CampaignUsersPill.svelte'
Expand Down Expand Up @@ -109,7 +110,8 @@
class="whitespace-pre-line overflow-hidden text-ellipsis line-clamp-3">{description}</Text
>
<div class="w-full flex flex-row justify-between gap-4">
<div class="flex flex-row gap-2">
<div class="flex flex-row gap-2 items-center">
<NetworkAvatar size="xs" networkId={`${NetworkNamespace.Evm}:${campaign.chainId}`} showTooltip />
<CampaignStatusPill {campaign} />
<CampaignTimestampPill {campaign} />
<CampaignUsersPill {campaign} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
import { Text } from '@bloomwalletio/ui'
import { ICampaign, featuredCampaigns } from '@contexts/campaigns'
import { setSelectedCampaign } from '@contexts/campaigns/stores'
import { MediaPlaceholder } from '@ui'
import { MediaPlaceholder, NetworkAvatar } from '@ui'
import { CampaignsRoute, campaignsRouter } from '../'
import { NetworkNamespace } from '@core/network'
import CampaignParticipantsPill from './CampaignParticipantsPill.svelte'
import CampaignStatusPill from './CampaignStatusPill.svelte'
import CampaignTimestampPill from './CampaignTimestampPill.svelte'
Expand Down Expand Up @@ -45,7 +46,8 @@
</div>
<div class="w-full flex flex-col items-start p-3 gap-2 overflow-hidden">
<Text type="body2" truncate>{campaign.title}</Text>
<div class="flex flex-row gap-2">
<div class="flex flex-row gap-2 items-center">
<NetworkAvatar size="xs" networkId={`${NetworkNamespace.Evm}:${campaign.chainId}`} showTooltip />
<CampaignStatusPill {campaign} />
<CampaignTimestampPill {campaign} />
<CampaignParticipantsPill {campaign} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,7 @@
},
]
: []),
...(features?.campaigns?.enabled &&
profileFeatures?.campaigns &&
($activeProfile?.network?.id === SupportedStardustNetworkId.Shimmer ||
$activeProfile?.network?.id === SupportedStardustNetworkId.Testnet)
...(features?.campaigns?.enabled && profileFeatures?.campaigns
? [
{
icon: IconName.Trophy,
Expand Down

0 comments on commit cd76870

Please sign in to comment.