Skip to content

Commit b6cd9c8

Browse files
committed
Remove loader when book is ready
1 parent a146aba commit b6cd9c8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/components/Reader/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ class Reader extends Component {
1919
this.setState({ ...this.state, location: item.href });
2020
}
2121

22+
handleReady() {
23+
this.setState({ ...this.state, isLoading: false });
24+
}
25+
2226
tocToggle() {
2327
let navMenu = document.getElementById('toc-nav');
2428

@@ -90,7 +94,7 @@ class Reader extends Component {
9094
src={`${getStreamHost()}/${book.id}/${download}/`}
9195
onNavigationReady={ this._navigationReady.bind(this) }
9296
onLocationChanged={(location) => console.log(location)}
93-
onReady={(book) => console.log("ready")}
97+
onReady={ this.handleReady.bind(this) }
9498
location={this.state.location}
9599
/>
96100
</div>

0 commit comments

Comments
 (0)