Skip to content

Commit

Permalink
Merge pull request #10119 from hicommonwealth/marcin/contest-fixes
Browse files Browse the repository at this point in the history
Contest/Farcaster contest fixes
  • Loading branch information
masvelio authored Dec 4, 2024
2 parents 6990943 + 93c33d7 commit 450ce85
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 89 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,9 @@ const DetailsFormStep = ({
<CWText className="contest-description">
Launch a contest using the funds from your community wallet to
create engagement incentives.{' '}
<CWText fontWeight="medium">Contests last 7 days</CWText> in
blockchain time.{' '}
<CWText fontWeight="medium">
Contests can be anywhere from 1 to 7 days in duration.
</CWText>{' '}
<a
href={CONTEST_FAQ_URL}
rel="noopener noreferrer"
Expand All @@ -260,8 +261,7 @@ const DetailsFormStep = ({
featureHint={{
title: 'How do I fund my contest?',
description:
'Contests are funded when community members purchase stake in the community. ' +
'Each transaction includes a small contribution to the community pool that can be used to fund contests.',
'Contests can be funded directly using any token that is on the same chain as your community.',
}}
>
<div className="DetailsFormStep">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const ContestPage = ({ contestAddress }: ContestPageProps) => {
<Skeleton height={300} width="100%" />
<Skeleton height={300} width="100%" />
</>
) : !farcasterCasts?.length ? (
) : !farcasterCasts?.[0]?.replies?.length ? (
<CWText>No entries for the contest yet</CWText>
) : (
<>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,8 @@ export const contestCard = frames(async (ctx) => {
>
Prizes
</Button>,
<Button
key="eligibility"
action="post"
target={`/${contest_address}/checkEligibility`}
>
Check Eligibility
</Button>,
<Button key="install" action="link" target={getActionInstallUrl()}>
Install Upvote Action
Add Upvote Action
</Button>,
],
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { checkEligibility } from './checkEligibility';
import { contestCard } from './contestCard';
import { contestPrizes } from './contestPrizes';

export { checkEligibility, contestCard, contestPrizes };
export { contestCard, contestPrizes };
3 changes: 1 addition & 2 deletions packages/commonwealth/server/farcaster/router.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import express from 'express';
import { checkEligibility, contestCard, contestPrizes } from './frames/contest';
import { contestCard, contestPrizes } from './frames/contest';

const farcasterRouter = express.Router();

// WARNING: do not change these paths because cloudflare may route to it
farcasterRouter.get('/:contest_address/contestCard', contestCard);
farcasterRouter.post('/:contest_address/contestCard', contestCard);
farcasterRouter.post('/:contest_address/contestPrizes', contestPrizes);
farcasterRouter.post('/:contest_address/checkEligibility', checkEligibility);

export default farcasterRouter;

0 comments on commit 450ce85

Please sign in to comment.