From 86654a2160704d721140b7e0d756cdc86a50cbc8 Mon Sep 17 00:00:00 2001 From: Tomasz Subik Date: Sun, 17 Nov 2024 10:31:08 +0100 Subject: [PATCH] no need to eager load as it's always loading fresh when going to that page --- components/operators-detail/layout.js | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/components/operators-detail/layout.js b/components/operators-detail/layout.js index b9078503..42d39927 100644 --- a/components/operators-detail/layout.js +++ b/components/operators-detail/layout.js @@ -92,20 +92,6 @@ export async function getInitialProps({ url, res, store, ...rest }) { } class OperatorsDetailLayout extends React.Component { - // all operators detail pages will eager load documents and timeline - componentDidMount() { - const { operatorsDetail } = this.props; - const operator = operatorsDetail.data; - - // eager load documentation tab as high probabilty user will switch to it - // only if not loaded - if (operatorsDetail.documentation.data.length === 0) { - this.props.getOperatorDocumentation(operator.id); - this.props.getOperatorDocumentationCurrent(operator.id); - this.props.getOperatorTimeline(operator.id); - } - } - /** * HELPERS * - getTabOptions