ldc-ovoteam/resources/ts/back/Components/WordCounter.tsx
Jérémy Munsch cd2d8ed397
refactor(i18n): replace GetTranslation with trans function
- Updated translation utility to improve consistency and reduce redundancy.
- Removed deprecated useTrans hook and related code.
- Introduced a new Zustand store for managing translations and locale settings.
- Cleaned up unused hooks and files related to localization.
2026-10-19 17:43:33 +02:00

19 lines
652 B
TypeScript

// * Other
import trans from "@/hooks/use-translations";
export default function WordCounter({ value }: { value: string }) {
const characters = value.length;
const words = characters ? value.split(" ").length : 0;
return (
<section className="flex justify-around w-full gap-1.5 bg-secondary rounded-md py-1">
<p className="text-sm text-muted-foreground mx-auto w-fit">
{trans("uwil-backend::back.characters")}
<span>{characters}</span>
</p>
<p className="text-sm text-muted-foreground mx-auto w-fit">
{trans("uwil-backend::back.words")}
<span>{words}</span>
</p>
</section>
);
}