mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-23 09:51:10 +01:00
Better license flows
This commit is contained in:
@@ -115,7 +115,6 @@ export function useHotKey(
|
||||
if (e.metaKey) currentKeysWithModifiers.add('Meta');
|
||||
if (e.shiftKey) currentKeysWithModifiers.add('Shift');
|
||||
|
||||
console.log('down', currentKeysWithModifiers);
|
||||
for (const [hkAction, hkKeys] of Object.entries(hotkeys) as [HotkeyAction, string[]][]) {
|
||||
if (
|
||||
(e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement) &&
|
||||
|
||||
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