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

Contest/Farcaster contest fixes #10119

Merged
merged 4 commits into from
Dec 4, 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 @@ -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;
Loading