soapbox/src/hooks/useSoapboxConfig.ts

11 wiersze
338 B
TypeScript

import { getSoapboxConfig } from 'soapbox/actions/soapbox';
import { useAppSelector } from './useAppSelector';
import type { SoapboxConfig } from 'soapbox/types/soapbox';
/** Get the Soapbox config from the store */
export const useSoapboxConfig = (): SoapboxConfig => {
return useAppSelector((state) => getSoapboxConfig(state));
};