Skip to Content
BBRICKSv0.7.4
Screens

PR · Challenges

Affiliate programs › Challenges, Live in the cards view: KPIs, status tabs, the toolbar with the cards / table switch and the challenge cards.

Affiliate programs › Challenges, Live in the cards view: KPIs, status tabs, the toolbar with the cards / table switch and the challenge cards. Composed in PrScreensChallenges.tsx from BRICKS exports only, in the pr theme, with the PR Portal v3 mock's numbers.

Challenges

Affiliate programs › Challenges, Live in the cards view: KPIs, status tabs, the toolbar with the cards / table switch and the challenge cards.

Pinned to TRNDR preset
Code
import { useLanguage } from '@ergasti/bricks';
import { PrChallengesScreen } from '../../../packages/bricks/src/gallery/screens/PrScreensChallenges';

function PrChallenges() { return <PrChallengesScreen language={useLanguage()} />; }

How it is built

  • The frame is PrPortalFrame (0.7.0), as on every framed PR page: the v3 nav with counts, the Open decisions card, the PR person row with sign-out, HeaderSearch, the bell and the raspberry "+ New".
  • Campaigns / Challenges PillTabs, PageGrid cols={4} (0.7.0) of four KpiCards, then the status PillTabs with counts and the scope Segmented.
  • ListToolbar with search, type and audience selects, sort, the cards / table Segmented in filters, and export.
  • One row type feeds both views: PrChallengeRow (0.7.0). The cards view is DataTable mode="cards" cardColumns={3} (0.7.0) with renderCard drawing PrChallengeCard {...toPrChallengeCard(row)} (0.7.0): timeProgress, daysLeft, goal, reward, rewardKind, noGiftsLeft on gift rewards, top three for leaderboards, people, held, money={{ decimals: 'auto' }}. The table view is challengeTableColumns(language, {}, { decimals: 'auto' }) (0.7.0).