Add gated content pages (or components) that render based on Subscription tiers 🙏💚💚💚
Exhibit best practices for conditional rendering of pages (or components) based on subscription tiers -already set up in this demo (Hobby, Freelancer, Startup and Enterprise for example)-.
Two options seem possible for such conditional rendering of elements:
Avoiding redirection: all users access a specific page but with different views.
membershipType == "Hobby" ? <HobbyComponent/> : <PleaseUpgradeComponent/> or similar.
Using a high-level component: using useEffect for accessing specific pages based on subscription tier (redirect URL).
membership type == "Gold" and redirect to whatever URL you want.
Great suggestion! This would be awesome to see. We don't have any plans to update this currently, but open to reviewing PRs if someone adds something for this.
Add gated content pages (or components) that render based on Subscription tiers 🙏💚💚💚
Exhibit best practices for conditional rendering of pages (or components) based on subscription tiers -already set up in this demo (Hobby, Freelancer, Startup and Enterprise for example)-.
Two options seem possible for such conditional rendering of elements:
<HobbyComponent/>
:<PleaseUpgradeComponent/>
or similar.🚀🚀🚀