Skip to content

Show "UNLOCK HARDCORE" if post is hardcore mode and user has no active subscriptions#28

Merged
cytommi merged 6 commits intocytommi/payments-repo-fixfrom
cytommi/show-hardcore-if-bought
Apr 23, 2025
Merged

Show "UNLOCK HARDCORE" if post is hardcore mode and user has no active subscriptions#28
cytommi merged 6 commits intocytommi/payments-repo-fixfrom
cytommi/show-hardcore-if-bought

Conversation

@cytommi
Copy link
Copy Markdown
Collaborator

@cytommi cytommi commented Apr 23, 2025

This lets us render "UNLOCK HARDCORE" when the post is hardcore mode, and the user has no active subscriptions:

Screenshot 2025-04-22 at 6 50 59 PM

This is a placeholder for the work in https://reddit.atlassian.net/jira/software/c/projects/DXF/boards/3293?issueParent=1312334&selectedIssue=DXF-1820

💸 TL;DR

📜 Details

Design Doc

Jira

🧪 Testing Steps / Validation

✅ Checks

  • CI tests (if present) are passing
  • Adheres to code style for repo
  • Contributor License Agreement (CLA) completed if not a Reddit employee

@cytommi cytommi changed the base branch from main to cytommi/unlock-hardcore April 23, 2025 01:53
@cytommi cytommi changed the base branch from cytommi/unlock-hardcore to main April 23, 2025 01:53
@cytommi cytommi force-pushed the cytommi/show-hardcore-if-bought branch from 5fad404 to f54b486 Compare April 23, 2025 01:55
@cytommi cytommi changed the base branch from main to cytommi/unlock-hardcore April 23, 2025 01:55
@cytommi cytommi changed the base branch from cytommi/unlock-hardcore to cytommi/payments-repo-fix April 23, 2025 01:58
const { mode, hardcoreModeAccess } = useGame();

if (mode === 'hardcore' && hardcoreModeAccess?.status === 'inactive') {
return <div>UNLOCK HARDCORE</div>;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: If this is a stub of the "default, not unlocked" page, this logic should likely be added to the userPage hook.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, this is a rudimentary placeholder. I'm adjusting pattern in the next PR

@cytommi cytommi requested a review from diego-codes April 23, 2025 18:16
@cytommi cytommi merged commit 4c26b80 into cytommi/payments-repo-fix Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants