Skip to content

Commit

Permalink
no need to eager load as it's always loading fresh when going to that…
Browse files Browse the repository at this point in the history
… page
  • Loading branch information
tsubik committed Nov 17, 2024
1 parent 433f5ff commit 86654a2
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions components/operators-detail/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 86654a2

Please sign in to comment.