Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const useInboxQueryParams = () => {
const uqp = useQueryParams(inboxQueryAllSpecification);
/* TODO: refactor this larger fn to do useCallback or useMemo, below probably really expensive */
const [qpValue, setQ] = uqp;
if (qpValue && qpValue.page === undefined) {
setQ({
pageSize: 10,
page: 1,
orderBy: 'date',
orderByType: 'desc'
})
}
return uqp;
};
export const useTaskContributionQueryParams = () => {
const uqp = useQueryParams(contributionsQueryAllSpecification);
return uqp;
};
export const useExploreProjectsQueryParams = () => {
return useQueryParams(projectQueryAllSpecification);
};