Skip to Content

Community Task Widget

CommunityTaskList displays sector-based community tasks and task dialogs.

Import

import { CommunityTaskList } from "@taskon/widget-react/community-task";

Usage

Cloud Config Mode

<CommunityTaskList widgetId={234} />

Local Mode (No widgetId)

<CommunityTaskList showSectorTab showSectorName showSectorDescription showSectorReward />

Key Props

PropTypeDescription
widgetIdnumberLoad cloud config and theme
themeMode"light" | "dark" | "auto"Override cloud mode
isPreviewbooleanPreview mode
sectorIdsnumber[]Restrict visible sectors
showSectorTabbooleanShow/hide sector tab selector
showSectorNamebooleanShow/hide sector name
showSectorDescriptionbooleanShow/hide sector description
showSectorRewardbooleanShow/hide sector rewards
rewardDisplayMode"popup" | "redirect"Reward detail display mode
rewardRedirectUrlstringRedirect URL when reward mode is redirect

URL Sync Props

PropTypeDescription
initialTaskIdnumberOpen a task dialog initially
onTaskOpen(taskId: number) => voidCalled when task dialog opens/switches
onTaskClose() => voidCalled when task dialog closes
initialTaskChainIdnumberOpen TaskChain dialog initially
onTaskChainOpen(taskChainId: number) => voidCalled when TaskChain opens
onTaskChainClose() => voidCalled when TaskChain closes

Example

CommunityTasksPage.tsx
import { TaskOnProvider } from "@taskon/widget-react/core"; import { CommunityTaskList } from "@taskon/widget-react/community-task"; function CommunityTasksPage() { return ( <TaskOnProvider config={{ clientId: "YOUR_CLIENT_ID" }}> <CommunityTaskList widgetId={234} initialTaskId={1001} onTaskOpen={(taskId) => { console.log("Open task", taskId); }} /> </TaskOnProvider> ); }

Note on TaskChain

TaskChain experience is integrated inside CommunityTaskList.
There is no standalone public TaskChain widget export.

Last updated on