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

feat: enable campaign for iota profiles #2563

Merged
merged 2 commits into from
May 29, 2024
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
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
Loading