diff --git a/packages/commonwealth/client/scripts/views/components/NewThreadFormLegacy/ContestThreadBanner/ContestThreadBanner.tsx b/packages/commonwealth/client/scripts/views/components/NewThreadFormLegacy/ContestThreadBanner/ContestThreadBanner.tsx index db03500d598..e0abae5098e 100644 --- a/packages/commonwealth/client/scripts/views/components/NewThreadFormLegacy/ContestThreadBanner/ContestThreadBanner.tsx +++ b/packages/commonwealth/client/scripts/views/components/NewThreadFormLegacy/ContestThreadBanner/ContestThreadBanner.tsx @@ -1,21 +1,11 @@ import React from 'react'; -import { CWCheckbox } from 'views/components/component_kit/cw_checkbox'; -import { CWText } from 'views/components/component_kit/cw_text'; import CWBanner from 'views/components/component_kit/new_designs/CWBanner'; import { CONTEST_FAQ_URL } from 'views/pages/CommunityManagement/Contests/utils'; import './ContestThreadBanner.scss'; -interface ContestThreadBannerProps { - submitEntryChecked: boolean; - onSetSubmitEntryChecked: (value: boolean) => void; -} - -const ContestThreadBanner = ({ - submitEntryChecked, - onSetSubmitEntryChecked, -}: ContestThreadBannerProps) => { +const ContestThreadBanner = () => { return ( - Submit Entry - onSetSubmitEntryChecked(!submitEntryChecked)} - /> - - } footer={ Learn more about contests diff --git a/packages/commonwealth/client/scripts/views/components/NewThreadFormLegacy/NewThreadForm.tsx b/packages/commonwealth/client/scripts/views/components/NewThreadFormLegacy/NewThreadForm.tsx index a1bd3182faf..1eff289af9e 100644 --- a/packages/commonwealth/client/scripts/views/components/NewThreadFormLegacy/NewThreadForm.tsx +++ b/packages/commonwealth/client/scripts/views/components/NewThreadFormLegacy/NewThreadForm.tsx @@ -7,7 +7,7 @@ import useJoinCommunityBanner from 'hooks/useJoinCommunityBanner'; import useTopicGating from 'hooks/useTopicGating'; import type { Topic } from 'models/Topic'; import { useCommonNavigate } from 'navigation/helpers'; -import React, { useEffect, useMemo, useState } from 'react'; +import React, { useEffect, useMemo } from 'react'; import { useLocation } from 'react-router-dom'; import app from 'state'; import { useGetUserEthBalanceQuery } from 'state/api/communityStake'; @@ -50,8 +50,6 @@ export const NewThreadForm = () => { const navigate = useCommonNavigate(); const location = useLocation(); - const [submitEntryChecked, setSubmitEntryChecked] = useState(false); - useAppStatus(); const communityId = app.activeChainId() || ''; @@ -232,8 +230,6 @@ export const NewThreadForm = () => { const contestThreadBannerVisible = isContestAvailable && hasTopicOngoingContest; - const isDisabledBecauseOfContestsConsent = - contestThreadBannerVisible && !submitEntryChecked; const contestTopicAffordanceVisible = isContestAvailable && hasTopicOngoingContest; @@ -367,12 +363,7 @@ export const NewThreadForm = () => { placeholder="Enter text or drag images and media here. Use the tab button to see your formatted post." /> - {!!contestThreadBannerVisible && ( - - )} + {!!contestThreadBannerVisible && } { disabled={ isDisabled || !user.activeAccount || - isDisabledBecauseOfContestsConsent || walletBalanceError || contestTopicError || !!disabledActionsTooltipText diff --git a/packages/commonwealth/client/scripts/views/components/NewThreadFormModern/ContestThreadBanner/ContestThreadBanner.tsx b/packages/commonwealth/client/scripts/views/components/NewThreadFormModern/ContestThreadBanner/ContestThreadBanner.tsx index db03500d598..e0abae5098e 100644 --- a/packages/commonwealth/client/scripts/views/components/NewThreadFormModern/ContestThreadBanner/ContestThreadBanner.tsx +++ b/packages/commonwealth/client/scripts/views/components/NewThreadFormModern/ContestThreadBanner/ContestThreadBanner.tsx @@ -1,21 +1,11 @@ import React from 'react'; -import { CWCheckbox } from 'views/components/component_kit/cw_checkbox'; -import { CWText } from 'views/components/component_kit/cw_text'; import CWBanner from 'views/components/component_kit/new_designs/CWBanner'; import { CONTEST_FAQ_URL } from 'views/pages/CommunityManagement/Contests/utils'; import './ContestThreadBanner.scss'; -interface ContestThreadBannerProps { - submitEntryChecked: boolean; - onSetSubmitEntryChecked: (value: boolean) => void; -} - -const ContestThreadBanner = ({ - submitEntryChecked, - onSetSubmitEntryChecked, -}: ContestThreadBannerProps) => { +const ContestThreadBanner = () => { return ( - Submit Entry - onSetSubmitEntryChecked(!submitEntryChecked)} - /> - - } footer={ Learn more about contests diff --git a/packages/commonwealth/client/scripts/views/components/NewThreadFormModern/NewThreadForm.tsx b/packages/commonwealth/client/scripts/views/components/NewThreadFormModern/NewThreadForm.tsx index f642e50e52f..ab17abb5cf8 100644 --- a/packages/commonwealth/client/scripts/views/components/NewThreadFormModern/NewThreadForm.tsx +++ b/packages/commonwealth/client/scripts/views/components/NewThreadFormModern/NewThreadForm.tsx @@ -6,7 +6,7 @@ import { detectURL, getThreadActionTooltipText } from 'helpers/threads'; import useJoinCommunityBanner from 'hooks/useJoinCommunityBanner'; import useTopicGating from 'hooks/useTopicGating'; import { useCommonNavigate } from 'navigation/helpers'; -import React, { useEffect, useRef, useState } from 'react'; +import React, { useEffect, useRef } from 'react'; import { useLocation } from 'react-router-dom'; import app from 'state'; import { useGetUserEthBalanceQuery } from 'state/api/communityStake'; @@ -47,8 +47,6 @@ export const NewThreadForm = () => { const markdownEditorMethodsRef = useRef(null); - const [submitEntryChecked, setSubmitEntryChecked] = useState(false); - useAppStatus(); const communityId = app.activeChainId() || ''; @@ -216,8 +214,6 @@ export const NewThreadForm = () => { const contestThreadBannerVisible = isContestAvailable && hasTopicOngoingContest; - const isDisabledBecauseOfContestsConsent = - contestThreadBannerVisible && !submitEntryChecked; const contestTopicAffordanceVisible = isContestAvailable && hasTopicOngoingContest; @@ -357,7 +353,6 @@ export const NewThreadForm = () => { isDisabled || !user.activeAccount || !!disabledActionsTooltipText || - isDisabledBecauseOfContestsConsent || walletBalanceError || contestTopicError } @@ -368,12 +363,7 @@ export const NewThreadForm = () => { )} /> - {contestThreadBannerVisible && ( - - )} + {contestThreadBannerVisible && }