feat(settings): replace static license CTA with dynamic upgrade cards (#201)

Community users now see Personal Pro and Team Pro cards with feature
highlights and direct Lemon Squeezy checkout links. Personal Pro users
see only the Team Pro upgrade option. Trial and Team Pro users see no
upgrade cards since they already have full access.
This commit is contained in:
Anso
2026-03-27 23:49:11 -04:00
committed by GitHub
parent 0cc198f86d
commit d3828e885d
6 changed files with 116 additions and 59 deletions
+1 -6
View File
@@ -26,7 +26,6 @@ interface LicenseContextType {
refresh: () => Promise<void>;
activate: (licenseKey: string) => Promise<{ success: boolean; error?: string }>;
deactivate: () => Promise<{ success: boolean; error?: string }>;
checkout: () => void;
}
const LicenseContext = createContext<LicenseContextType | undefined>(undefined);
@@ -88,14 +87,10 @@ export function LicenseProvider({ children }: { children: ReactNode }) {
}
}, []);
const checkout = useCallback(() => {
window.open('https://sencho.io/#pricing', '_blank');
}, []);
const isPro = license?.tier === 'pro';
return (
<LicenseContext.Provider value={{ license, isPro, loading, refresh, activate, deactivate, checkout }}>
<LicenseContext.Provider value={{ license, isPro, loading, refresh, activate, deactivate }}>
{children}
</LicenseContext.Provider>
);