import { StoreState } from 'app/common/store/store.types'; import { FaqCategory } from './faq.types'; const faqStateSlice = (state: StoreState) => state.faq; export const selectCategories = (state: StoreState) => { const faqData: FaqCategory[] = faqStateSlice(state).categories.filter((category) => category.items && category.items.length > 0); return faqData; };