mirror of
https://github.com/lux-tel/session-desktop.git
synced 2026-10-30 20:33:24 +00:00
18 lines
532 B
TypeScript
18 lines
532 B
TypeScript
import { useSelector } from 'react-redux';
|
|
import { ModalsState } from '../ducks/modals';
|
|
import { OnboardingStoreState } from '../store';
|
|
|
|
const getModals = (state: OnboardingStoreState): ModalsState => {
|
|
return state.modals;
|
|
};
|
|
|
|
export function useQuitModalState() {
|
|
return useSelector((state: OnboardingStoreState) => getModals(state).quitModalState);
|
|
}
|
|
|
|
export function useTermsOfServicePrivacyModalState() {
|
|
return useSelector(
|
|
(state: OnboardingStoreState) => getModals(state).termsOfServicePrivacyModalState
|
|
);
|
|
}
|