From d0bbee7e8c3eaac1f727a9f40a2213d041938c3b Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Tue, 12 Jun 2018 16:11:31 -0700 Subject: Fix issue with positions hash --- packages/website/ts/pages/jobs/open_positions.tsx | 40 ++++++++++++----------- 1 file changed, 21 insertions(+), 19 deletions(-) (limited to 'packages/website/ts/pages') diff --git a/packages/website/ts/pages/jobs/open_positions.tsx b/packages/website/ts/pages/jobs/open_positions.tsx index 79b51c0d1..f3d980315 100644 --- a/packages/website/ts/pages/jobs/open_positions.tsx +++ b/packages/website/ts/pages/jobs/open_positions.tsx @@ -44,26 +44,28 @@ export class OpenPositions extends React.Component + {isReadyToRender ? this._renderBody() : this._renderLoading()} + + ); + } + private _renderBody(): React.ReactNode { const isSmallScreen = this.props.screenWidth === ScreenWidths.Sm; - if (!isReadyToRender) { - return ( - // TODO: consolidate this loading component with the one in portal and RelayerIndex - // TODO: possibly refactor into a generic loading container with spinner and retry UI -
- {_.isUndefined(this.state.error) ? ( - - ) : ( - - )} -
- ); - } else { - return ( -
- {isSmallScreen ? this._renderList() : this._renderTable()} -
- ); - } + return isSmallScreen ? this._renderList() : this._renderTable(); + } + private _renderLoading(): React.ReactNode { + return ( + // TODO: consolidate this loading component with the one in portal and RelayerIndex + // TODO: possibly refactor into a generic loading container with spinner and retry UI +
+ {_.isUndefined(this.state.error) ? ( + + ) : ( + + )} +
+ ); } private _renderList(): React.ReactNode { return ( -- cgit