2023-04-19 08:42:37 +00:00
|
|
|
import { useMemo } from 'react';
|
|
|
|
import { useVegaReleases } from './use-vega-releases';
|
|
|
|
|
|
|
|
export const useVegaRelease = (tag: string, includeDevReleases = false) => {
|
2023-05-22 19:53:40 +00:00
|
|
|
const { data } = useVegaReleases(includeDevReleases, 'force-cache');
|
2023-04-19 08:42:37 +00:00
|
|
|
return useMemo(() => {
|
|
|
|
return data?.find((r) => r.tagName === tag);
|
|
|
|
}, [data, tag]);
|
|
|
|
};
|