Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Fix bad rebase changes

dominik-zeglend92cbbf97102
diff --git a/saleor/static/dashboard-next/components/Anchor/Anchor.tsx b/saleor/static/dashboard-next/components/Anchor/Anchor.tsx
index 39c65d3714..c2dd266009 100644
--- a/saleor/static/dashboard-next/components/Anchor/Anchor.tsx
+++ b/saleor/static/dashboard-next/components/Anchor/Anchor.tsx
@@ -1,6 +1,6 @@
import * as React from "react";
-export interface AnchorProps extends React.HTMLAttributes<HTMLDivElement> {
+export interface AnchorProps {
children: (anchor: React.RefObject<HTMLDivElement>) => React.ReactNode;
}
@@ -8,11 +8,7 @@ class Anchor extends React.Component<AnchorProps> {
anchor = React.createRef<HTMLDivElement>();
render() {
- return (
- <div ref={this.anchor} {...this.props}>
- {this.props.children(this.anchor)}
- </div>
- );
+ return this.anchor ? this.props.children(this.anchor) : null;
}
}
export default Anchor;