diff --git a/src/components/App.tsx b/src/components/App.tsx index 66feb83..06da9ab 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -43,7 +43,6 @@ const initialState = { }; class App extends React.PureComponent { - public state = initialState; private inputRef: React.RefObject; @@ -83,7 +82,7 @@ class App extends React.PureComponent { <> {/* sidebar */} - + { open={!this.props.paneHidden} >
-
+
{ {this.props.cardListTitle} @@ -145,13 +143,15 @@ class App extends React.PureComponent { >
@@ -191,9 +191,7 @@ class App extends React.PureComponent { [styles.pane_fullscreen]: this.props.paneHidden, })} > - - - +
{/* dialogs */} @@ -230,4 +228,7 @@ const mapDispatchToProps = (dispatch: Dispatch): Partial => ({ }, }); -export default connect(mapStateToProps, mapDispatchToProps)(App); +export default connect( + mapStateToProps, + mapDispatchToProps, +)(App); diff --git a/src/components/CardList.tsx b/src/components/CardList.tsx index eefecd3..b6dabbd 100644 --- a/src/components/CardList.tsx +++ b/src/components/CardList.tsx @@ -104,8 +104,13 @@ const mapStateToProps = (state): Partial => { return { type: ui.cardTypeFilter, course: ui.cardCourseFilter, - ...generateCardList(data, data.lastUpdateTime, - ui.cardTypeFilter, ui.cardCourseFilter, ui.titleFilter), + ...generateCardList( + data, + data.lastUpdateTime, + ui.cardTypeFilter, + ui.cardCourseFilter, + ui.titleFilter, + ), title: ui.cardListTitle, threshold: ui.cardVisibilityThreshold, }; diff --git a/src/components/ContentDetail.tsx b/src/components/ContentDetail.tsx index f4b6966..8707651 100644 --- a/src/components/ContentDetail.tsx +++ b/src/components/ContentDetail.tsx @@ -23,9 +23,9 @@ class ContentDetail extends React.PureComponent {
- {this.generateLine('课程名称', content.courseName)} - {isHomework ? this.generateDetailsForHomework(homework) : null} - {isNotification ? this.generateDetailsForNotification(notification) : null} + {this.generateLine('课程名称', content.courseName)} + {isHomework ? this.generateDetailsForHomework(homework) : null} + {isNotification ? this.generateDetailsForNotification(notification) : null}
diff --git a/src/components/ContentIgnoreSetting.tsx b/src/components/ContentIgnoreSetting.tsx index 1f3e365..606ec2f 100644 --- a/src/components/ContentIgnoreSetting.tsx +++ b/src/components/ContentIgnoreSetting.tsx @@ -55,11 +55,7 @@ class ContentIgnoreSetting extends React.PureComponent { this.props.dispatch( - toggleContentIgnore( - s.course.id, - type, - !s.ignore[type], - ), + toggleContentIgnore(s.course.id, type, !s.ignore[type]), ); }} /> diff --git a/src/components/DetailPane.tsx b/src/components/DetailPane.tsx index 9def4ae..349367b 100644 --- a/src/components/DetailPane.tsx +++ b/src/components/DetailPane.tsx @@ -16,11 +16,17 @@ class DetailPane extends React.PureComponent { } else if (this.props.content !== undefined) { return ; } else { - return