diff --git a/frontend/__tests__/components/common/AsyncContent.spec.tsx b/frontend/__tests__/components/common/AsyncContent.spec.tsx index 6902b670d586..39328af98d2a 100644 --- a/frontend/__tests__/components/common/AsyncContent.spec.tsx +++ b/frontend/__tests__/components/common/AsyncContent.spec.tsx @@ -142,7 +142,7 @@ describe("AsyncContent", () => { query: { result: string | Error; }, - options?: Omit, "query" | "queries" | "children">, + options?: Omit, "queries" | "children">, ): { container: HTMLElement; } { @@ -160,12 +160,18 @@ describe("AsyncContent", () => { })); return ( - )}> - {(data: string | undefined) => ( + )} + > + {({ resultData }) => ( <> static content - no data}> -
{data}
+ no data} + > +
{resultData()}
)} @@ -318,7 +324,10 @@ describe("AsyncContent", () => { first: string | Error | undefined; second: string | Error | undefined; }, - options?: Omit, "query" | "queries" | "children">, + options?: Omit< + Props<{ first: string; second: string }>, + "queries" | "children" + >, ): { container: HTMLElement; } { @@ -347,24 +356,20 @@ describe("AsyncContent", () => { })); type Q = { first: string | undefined; second: string | undefined }; + return ( )} > - {(results: { - first: string | undefined; - second: string | undefined; - }) => ( + {({ firstData, secondData }) => ( <> no data} > -
{results.first}
-
{results.second}
+
{firstData()}
+
{secondData()}
)} diff --git a/frontend/src/html/pages/test.html b/frontend/src/html/pages/test.html index de4b16820652..49f01e1ba8a9 100644 --- a/frontend/src/html/pages/test.html +++ b/frontend/src/html/pages/test.html @@ -1,5 +1,5 @@