import { selector } from 'recoil';

import { list } from '../../services/category';

export const categoriesQuery = selector({
    key: 'categories',
    get: async ({ get }) => {
        const categories = await list();

        return categories;
    },
});
