Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Prevent rendering children twice
dominik-zeglenc4ea22b0c1c7
diff --git a/saleor/static/dashboard-next/components/Shop/index.tsx b/saleor/static/dashboard-next/components/Shop/index.tsxindex 264aa82350..1c3a017c28 100644--- a/saleor/static/dashboard-next/components/Shop/index.tsx+++ b/saleor/static/dashboard-next/components/Shop/index.tsx@@ -9,15 +9,11 @@ export const shopContext = React.createContext<ShopContext>(undefined);export const ShopProvider: React.StatelessComponent<{}> = ({ children }) => (<TypedShopInfoQuery>- {({ data }) =>- data && data.shop !== undefined ? (- <shopContext.Provider value={data.shop}>- {children}- </shopContext.Provider>- ) : (- children- )- }+ {({ data }) => (+ <shopContext.Provider value={data ? data.shop : undefined}>+ {children}+ </shopContext.Provider>+ )}</TypedShopInfoQuery>);export const Shop = shopContext.Consumer;