Skip to content
This repository was archived by the owner on Mar 16, 2026. It is now read-only.

Commit 02b2274

Browse files
committed
feat(proposal-submission): Require user consent for submissions
1 parent c5aabad commit 02b2274

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

src/components/proposals/ProposalSubmission.tsx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,9 @@ export function ProposalSubmission({
264264
const [xUsernameError, setXUsernameError] = useState<string | null>(null);
265265
const [xProfile, setXProfile] = useState<XProfile | null>(null);
266266

267+
// Consent checkbox state
268+
const [consentChecked, setConsentChecked] = useState(false);
269+
267270
const { accessToken, isLoading: isSessionLoading, userId } = useAuth();
268271
const {
269272
needsXLink,
@@ -811,6 +814,7 @@ export function ProposalSubmission({
811814
if (isSuccess) {
812815
setTxStatusView("confirmed-success");
813816
setTwitterUrl("");
817+
setConsentChecked(false);
814818
// setSelectedAirdropTxHash(null); // Commented out - airdrop feature disabled
815819
} else if (isFailed) setTxStatusView("confirmed-failure");
816820

@@ -1690,6 +1694,28 @@ export function ProposalSubmission({
16901694
</form>
16911695
</div>
16921696

1697+
{/* Consent Checkbox - Outside overlays */}
1698+
{hasAccessToken && (
1699+
<div className="flex items-start gap-3 rounded-sm">
1700+
<input
1701+
type="checkbox"
1702+
id="consent-checkbox"
1703+
checked={consentChecked}
1704+
onChange={(e) => setConsentChecked(e.target.checked)}
1705+
disabled={isSubmitting || isLoadingExtensions || isLoadingAgents}
1706+
className="mt-1 h-4 w-4 rounded border-white/10 bg-background text-primary cursor-pointer"
1707+
/>
1708+
<label
1709+
htmlFor="consent-checkbox"
1710+
className="text-sm text-muted-foreground leading-relaxed cursor-pointer select-none"
1711+
>
1712+
By submitting, you confirm you obtained consent from everyone
1713+
identifiable in these photos or videos and authorize AIBTC to
1714+
share and repost them.
1715+
</label>
1716+
</div>
1717+
)}
1718+
16931719
{/* Footer CTA */}
16941720
<div className="pt-6">
16951721
{!hasAccessToken ? (
@@ -1701,6 +1727,7 @@ export function ProposalSubmission({
17011727
disabled={
17021728
!twitterUrl.trim() ||
17031729
!isValidTwitterUrl ||
1730+
!consentChecked ||
17041731
isSubmitting ||
17051732
isValidatingXUsername ||
17061733
!hasAgentAccount ||

0 commit comments

Comments
 (0)