From ac256b60baf27b595255f408294af6f9dfe0f19c Mon Sep 17 00:00:00 2001 From: braimbault Date: Tue, 10 Sep 2024 15:34:39 +0200 Subject: [PATCH] fix: add translucent prop to CachedDataQueryProvider --- src/components/CachedDataQueryProvider.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/CachedDataQueryProvider.js b/src/components/CachedDataQueryProvider.js index 47646a1f1..e4a3786d0 100644 --- a/src/components/CachedDataQueryProvider.js +++ b/src/components/CachedDataQueryProvider.js @@ -6,7 +6,12 @@ import React, { createContext, useContext } from 'react' const CachedDataQueryCtx = createContext({}) -const CachedDataQueryProvider = ({ query, dataTransformation, children }) => { +const CachedDataQueryProvider = ({ + query, + dataTransformation, + children, + translucent = true, +}) => { const { data: rawData, ...rest } = useDataQuery(query) const { error, loading } = rest const data = @@ -14,7 +19,7 @@ const CachedDataQueryProvider = ({ query, dataTransformation, children }) => { if (loading) { return ( - + @@ -43,6 +48,7 @@ CachedDataQueryProvider.propTypes = { children: PropTypes.node.isRequired, query: PropTypes.object.isRequired, dataTransformation: PropTypes.func, + translucent: PropTypes.bool, } const useCachedDataQuery = () => useContext(CachedDataQueryCtx)