bigbuffet-rw/app/soapbox/hooks/useFeatures.ts
2022-03-30 15:50:16 -05:00

9 lines
318 B
TypeScript

import { useAppSelector } from 'soapbox/hooks';
import { getFeatures } from 'soapbox/utils/features';
import type { Features } from 'soapbox/utils/features';
/** Get features for the current instance */
export const useFeatures = (): Features => {
return useAppSelector((state) => getFeatures(state.instance));
};