Skip to content

Commit

Permalink
add a tooltip to user history button
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkIntaqt committed Apr 28, 2024
1 parent ed827f9 commit e88e1ea
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/module/user/UserHistory.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Loader from "../Loader";
import get from "../../func/get";
import Match from "./Match";
import { getStorage, setStorage, storageKeys } from "../../func/localStorageFunctions";
import { Tooltip } from "react-tooltip";


export default class History extends Component {
Expand Down Expand Up @@ -206,13 +207,14 @@ export default class History extends Component {

return <div className={css.matches}>

<Tooltip id="hide-tip" />
<div className={css.heading}>
<button className={!this.state.showMaxChallenges ? css.active : css.inactive} onClick={() => {
setStorage(storageKeys.showMaxChallenges, !this.state.showMaxChallenges);
this.setState({ showMaxChallenges: !this.state.showMaxChallenges });
}}>
}} data-tooltip-id="hide-tip" data-tooltip-content={"Don't show challenges that are either maxed or Master+"}>
<img src="https://lolcdn.darkintaqt.com/cdn/i.png" alt="" />
hide maxed challenges
Hide maxed challenges
</button>
</div>
<div className={css.matches}>
Expand Down

0 comments on commit e88e1ea

Please sign in to comment.