mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-08-15 05:03:14 +00:00
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:
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user