mirror of https://github.com/buster-so/buster.git
Update useGetAsset.tsx
This commit is contained in:
parent
255460b0e3
commit
0c0973195d
|
@ -118,6 +118,18 @@ export const useGetAsset = (
|
||||||
{ enabled: isDashboard, select: (x) => x?.dashboard?.name, staleTime: Infinity }
|
{ enabled: isDashboard, select: (x) => x?.dashboard?.name, staleTime: Infinity }
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const {
|
||||||
|
isFetched: reportIsFetched,
|
||||||
|
error: reportError,
|
||||||
|
isError: reportIsError,
|
||||||
|
data: reportTitle
|
||||||
|
} = useGetReport(
|
||||||
|
{ reportId: isReport ? props.assetId : undefined, versionNumber },
|
||||||
|
{
|
||||||
|
select: (x) => x?.name
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
const {
|
const {
|
||||||
isFetched: collectionIsFetched,
|
isFetched: collectionIsFetched,
|
||||||
error: collectionError,
|
error: collectionError,
|
||||||
|
@ -127,15 +139,6 @@ export const useGetAsset = (
|
||||||
select: (x) => x?.name
|
select: (x) => x?.name
|
||||||
});
|
});
|
||||||
|
|
||||||
const {
|
|
||||||
isFetched: reportIsFetched,
|
|
||||||
error: reportError,
|
|
||||||
isError: reportIsError,
|
|
||||||
data: reportTitle
|
|
||||||
} = useGetReport(isReport ? props.assetId : undefined, {
|
|
||||||
select: (x) => x?.name
|
|
||||||
});
|
|
||||||
|
|
||||||
const currentQuery = useMemo((): AssetQueryResult => {
|
const currentQuery = useMemo((): AssetQueryResult => {
|
||||||
switch (props.type) {
|
switch (props.type) {
|
||||||
case 'metric':
|
case 'metric':
|
||||||
|
|
Loading…
Reference in New Issue