mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-28 20:21:52 +01:00
Better license flows
This commit is contained in:
15
src-web/hooks/useLicenseConfirmation.ts
Normal file
15
src-web/hooks/useLicenseConfirmation.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { useKeyValue } from './useKeyValue';
|
||||
|
||||
interface LicenseConfirmation {
|
||||
hasDismissedTrial: boolean;
|
||||
confirmedPersonalUse: boolean;
|
||||
}
|
||||
|
||||
export function useLicenseConfirmation() {
|
||||
const { set, value } = useKeyValue<LicenseConfirmation>({
|
||||
key: 'license_confirmation',
|
||||
fallback: { hasDismissedTrial: false, confirmedPersonalUse: false },
|
||||
});
|
||||
|
||||
return [value, set] as const;
|
||||
}
|
||||
Reference in New Issue
Block a user