Skip to content

Commit

Permalink
fix: overview
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamerblue committed Feb 3, 2024
1 parent cde47cf commit df43670
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/pages/competitions/$id/overview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -264,11 +264,17 @@ class CompetitionOverview extends React.Component<Props, State> {
}
}

componentWillUpdate(nextProps: Readonly<Props>, nextState: Readonly<State>, nextContext: any): void {
const genshinTableRowEle = document.querySelectorAll('.genshin-section-table-row');
genshinTableRowEle.forEach((el) => {
el.removeEventListener('click', this.handleGenshinTableRowClick);
});
}

componentDidUpdate(prevProps: Readonly<Props>, prevState: Readonly<State>): void {
this.handleGenshinWindowResize(); // 初始化尺寸
const genshinTableRowEle = document.querySelectorAll('.genshin-section-table-row');
genshinTableRowEle.forEach((el) => {
el.removeEventListener('click', this.handleGenshinTableRowClick);
el.addEventListener('click', this.handleGenshinTableRowClick);
});
}
Expand Down

0 comments on commit df43670

Please sign in to comment.