diff --git a/app/ui/AddLocationButton.tsx b/app/ui/AddLocationButton.tsx index a14f4f8..2f68524 100644 --- a/app/ui/AddLocationButton.tsx +++ b/app/ui/AddLocationButton.tsx @@ -11,11 +11,11 @@ export interface AddLocationButtonProps { export const AddLocationButton:React.FC = ({yearMonth}) => { - const t = useTranslations("home-page"); + const t = useTranslations("home-page.add-location-button"); return(
- + diff --git a/app/ui/AddMonthButton.tsx b/app/ui/AddMonthButton.tsx index 9e51c9f..8ba1484 100644 --- a/app/ui/AddMonthButton.tsx +++ b/app/ui/AddMonthButton.tsx @@ -1,3 +1,5 @@ +"use client"; + import { PlusCircleIcon, CalendarDaysIcon } from "@heroicons/react/24/outline"; import React from "react"; import { formatYearMonth } from "../lib/format"; @@ -11,12 +13,12 @@ export interface AddMonthButtonProps { export const AddMonthButton:React.FC = ({ yearMonth }) => { - const t = useTranslations("home-page"); + const t = useTranslations("home-page.add-month-button"); const locale = useLocale(); return(
- + diff --git a/app/ui/BillDeleteForm.tsx b/app/ui/BillDeleteForm.tsx index 3743c3b..b5d79b0 100644 --- a/app/ui/BillDeleteForm.tsx +++ b/app/ui/BillDeleteForm.tsx @@ -29,7 +29,7 @@ export const BillDeleteForm:FC = ({ bill, location }) => { t.rich("text", { bill_name:bill.name, location_name:location.name, - strong: (chunks:ReactNode) => ${chunks}, + strong: (chunks:ReactNode) => {chunks}, }) }

diff --git a/app/ui/LocationCard.tsx b/app/ui/LocationCard.tsx index 1510a30..ce257ca 100644 --- a/app/ui/LocationCard.tsx +++ b/app/ui/LocationCard.tsx @@ -1,7 +1,7 @@ -'client only'; +'use client'; import { Cog8ToothIcon, PlusCircleIcon } from "@heroicons/react/24/outline"; -import { FC, ReactNode } from "react"; +import { FC } from "react"; import { BillBadge } from "./BillBadge"; import { BillingLocation } from "../lib/db-types"; import { formatYearMonth } from "../lib/format"; @@ -38,7 +38,7 @@ export const LocationCard:FC = ({location: { _id, name, yearM { monthlyExpense > 0 ?

- { t("payed-total") } ${monthlyExpense} + { t("payed-total") } ${formatCurrency(monthlyExpense)}

: null } diff --git a/app/ui/LocationDeleteForm.tsx b/app/ui/LocationDeleteForm.tsx index d3b8c6e..0524aa9 100644 --- a/app/ui/LocationDeleteForm.tsx +++ b/app/ui/LocationDeleteForm.tsx @@ -32,7 +32,7 @@ export const LocationDeleteForm:FC = ({ location }) => { t.rich("text", { name:location.name, - strong: (chunks:ReactNode) => `${chunks}`, + strong: (chunks:ReactNode) => {chunks}, }) }

diff --git a/app/ui/SelectLanguage.tsx b/app/ui/SelectLanguage.tsx index 478eeba..28b2e3a 100644 --- a/app/ui/SelectLanguage.tsx +++ b/app/ui/SelectLanguage.tsx @@ -12,5 +12,5 @@ export const SelectLanguage: React.FC = () => { const secondLocale = locales.find((l) => l !== currentLocale) as string; const secondLocalePathname = defaultLocale === currentLocale ? `/${secondLocale}${currentPathname}` : currentPathname.replace(`/${currentLocale}`, `/${secondLocale}`); - return ({localeNames[secondLocale]}); + return ({localeNames[secondLocale]}); } \ No newline at end of file