Skip to content

Commit

Permalink
Merge pull request #755 from lkiesow/stats-tooltip
Browse files Browse the repository at this point in the history
Remove Tooltip from Stats Filter
  • Loading branch information
Arnei committed Jul 5, 2024
2 parents f1b49ba + 920f8cc commit dff23eb
Showing 1 changed file with 14 additions and 20 deletions.
34 changes: 14 additions & 20 deletions src/components/shared/Stats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { connect } from "react-redux";
import { loadEventsIntoTable } from "../../thunks/tableThunks";
import { useAppDispatch, useAppSelector } from "../../store";
import { fetchEvents } from "../../slices/eventSlice";
import { Tooltip } from "./Tooltip";

/**
* This component renders the status bar of the event view and filters depending on these
Expand Down Expand Up @@ -59,25 +58,20 @@ const Stats = ({
{/* Show one counter for each status */}
{stats.map((st, key) => (
<div className="col" key={key}>
<Tooltip title={t(st.description)}>
<button
className="stat"
onClick={() => showStatsFilter(st)}
>
<h1>{st.count}</h1>
{/* Show the description of the status, if defined,
else show name of filter and its value*/}
{!!st.description ? (
<span>{t(st.description)}</span>
) : (
st.filters.map((filter, key) => (
<span key={key}>
{t(filter.filter)}: {t(filter.value)}
</span>
))
)}
</button>
</Tooltip>
<button className="stat" onClick={() => showStatsFilter(st)}>
<h1>{st.count}</h1>
{/* Show the description of the status, if defined,
else show name of filter and its value*/}
{!!st.description ? (
<span>{t(st.description)}</span>
) : (
st.filters.map((filter, key) => (
<span key={key}>
{t(filter.filter)}: {t(filter.value)}
</span>
))
)}
</button>
</div>
))}
</div>
Expand Down

0 comments on commit dff23eb

Please sign in to comment.