Skip to content

Commit

Permalink
fix: lazyload
Browse files Browse the repository at this point in the history
  • Loading branch information
hiroppy committed Jun 16, 2019
1 parent 85bbc6e commit ba9669b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/client/src/components/AppContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,9 @@ export class AppContainer extends React.Component {
}
}

componentWillMount() {
async componentDidMount() {
this.changeSidebarState();
}

async componentDidMount() {
const slides = AppContainer.createProps(this.props.slides);

this.setState({ ...slides });
Expand Down
2 changes: 1 addition & 1 deletion src/client/src/components/ContentView/Base.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class Base extends React.PureComponent {
fusumaProps.sectionTitle ? 'section-title' : undefined
)}
>
<Slide />
{(currentIndex >= i - 5 && currentIndex <= i + 5) || !lazyload ? <Slide /> : <div />}
</section>
))}
</article>
Expand Down

0 comments on commit ba9669b

Please sign in to comment.