Skip to content

Commit

Permalink
fix: revert i18n usage
Browse files Browse the repository at this point in the history
  • Loading branch information
pengx17 committed Jun 7, 2022
1 parent 1d82696 commit 3da0c9c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/Heatmap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import {
parseJournalDate,
useCurrentJournalDate,
} from "./utils";
import { t } from "./translate";

function ErrorFallback({ error }: FallbackProps) {
return (
Expand Down Expand Up @@ -128,10 +127,7 @@ const getTooltipDataAttrs = (value: Datum) => {
// Configuration for react-tooltip
const count = value.count === 0 ? "No" : value.count;
return {
"data-tip": t("tooltip_hint", {
count,
originalName: value.originalName,
}),
"data-tip": `<strong>${count} journal blocks</strong> on <span class="opacity-70">${value.originalName}</span>`,
};
};

Expand Down Expand Up @@ -188,8 +184,8 @@ const HeatmapChart = ({
}}
/>
<div className="text-xs text-right mt-1">
{t('total_status_bottom')}
<span className="font-medium ml-0.5">
Total journal blocks during this period:{" "}
<span className="font-medium">
{new Intl.NumberFormat().format(totalBlocks)}
</span>
</div>
Expand Down

0 comments on commit 3da0c9c

Please sign in to comment.