Skip to content

Added ContestEnded quest #12065

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions packages/commonwealth/client/scripts/helpers/quest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ export const doesActionRequireBasicRewardAmount = (action: QuestActionType) => {
'DiscordServerJoined',
'MembershipsRefreshed',
'LaunchpadTokenCreated',
'ContestEnded',
];
const channelQuest: QuestActionType[] = [
'TweetEngagement',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ const useQuestForm = ({ mode, initialValues, questId }: QuestFormProps) => {
'MembershipsRefreshed',
'LaunchpadTokenCreated',
'LaunchpadTokenTraded',
'ContestEnded',
] as QuestAction[],
channel: ['TweetEngagement', 'XpChainEventCreated'] as QuestAction[],
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export const actionCopies = {
['XpChainEventCreated']: 'Engage on Blockchain',
['LaunchpadTokenCreated']: 'Launch a Token on Common',
['LaunchpadTokenTraded']: 'Trade a Launchpad Token on Common',
['ContestEnded']: 'Engage on a Contest till completion',
},
pre_reqs: {
['SignUpFlowCompleted']: () => '',
Expand All @@ -37,6 +38,7 @@ export const actionCopies = {
['XpChainEventCreated']: () => '',
['LaunchpadTokenCreated']: () => '',
['LaunchpadTokenTraded']: () => '',
['ContestEnded']: '',
},
explainer: {
['SignUpFlowCompleted']: () => '',
Expand Down Expand Up @@ -132,6 +134,16 @@ export const actionCopies = {
</ul>
</div>
),
// eslint-disable-next-line react/no-multi-comp
['ContestEnded']: () => (
<div>
<ul>
<li>● Contest must be funded with a prize pool</li>
<li>● Aura is awarded when the contest is successfully deployed</li>
<li>● Only the contest creator receives Aura for this action</li>
</ul>
</div>
),
},
shares: {
['SignUpFlowCompleted']: '',
Expand All @@ -150,5 +162,6 @@ export const actionCopies = {
['XpChainEventCreated']: '',
['LaunchpadTokenCreated']: '',
['LaunchpadTokenTraded']: '',
['ContestEnded']: '',
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,19 @@ const QuestDetails = ({ id }: { id: number }) => {
navigate(`/explore?tab=tokens`);
break;
}
case 'ContestEnded': {
if (quest.community_id) {
navigate(
`/${quest.community_id}/contests`,
{},
quest.community_id || null,
);
} else {
// If no community context, navigate to community selection for contest view
navigate('/explore?tab=communities', {}, null);
}
break;
}
default:
return;
}
Expand Down
Loading