Sprint 1: Foundation Fix - Complete
- Add tier system migration (free/pro) - FamilyProvider with tier and memberCount - Ready for freemium model with limits Run migration: psql -f drizzle/0005_tier_system.sql Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
4f5836909c
commit
4a8833b4c7
1 changed files with 4 additions and 0 deletions
|
|
@ -75,6 +75,10 @@ export function FamilyProvider({ children: providerChildren }: { children: React
|
||||||
fetchFamilyData();
|
fetchFamilyData();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
// Check if can add more children/members based on tier limits
|
||||||
|
const canAddChild = () => memberCount < 2 || tier === "pro"; // free = 1 child, pro = unlimited
|
||||||
|
const canAddMember = () => memberCount < 2 && tier === "free" ? false : true;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<FamilyContext.Provider
|
<FamilyContext.Provider
|
||||||
value={{
|
value={{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue