vega-frontend-monorepo/libs/environment/src/hooks/use-vega-release.ts

10 lines
333 B
TypeScript

import { useMemo } from 'react';
import { useVegaReleases } from './use-vega-releases';
export const useVegaRelease = (tag: string, includeDevReleases = false) => {
const { data } = useVegaReleases(includeDevReleases, 'force-cache');
return useMemo(() => {
return data?.find((r) => r.tagName === tag);
}, [data, tag]);
};