bigbuffet-rw/app/soapbox/hooks/useFeatures.ts

10 lines
318 B
TypeScript
Raw Normal View History

2022-03-30 13:50:16 -07:00
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));
};