Skip to content

Commit

Permalink
Fix build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
lil5 committed Dec 9, 2024
1 parent 7202d13 commit f0f7dd7
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
5 changes: 4 additions & 1 deletion frontend/src/components/react/components/Testimonials.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ export default function Testimonials() {
const { t } = useTranslation("testimonials");

let testimonials: Testimonial[] =
t("arrTestimonials", { defaultValue: [], returnObjects: true }) || [];
(t("arrTestimonials", {
defaultValue: [],
returnObjects: true,
}) as any[]) || [];

function click(o: CarouselOperation) {
let e = document.getElementById("home-carousel");
Expand Down
9 changes: 6 additions & 3 deletions frontend/src/pages/404.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ import { localizePath } from "../languages";
import Base from "../layouts/Base.astro";
import { t, changeLanguage } from "i18next";
const { lang = "en" } = Astro.params;
changeLanguage(lang);
import { buildStaticPaths } from "astro-react-i18next/utils";
export function getStaticPaths() {
return buildStaticPaths();
}
---

<Base title="404">
Expand All @@ -14,7 +17,7 @@ changeLanguage(lang);
<h1 class="font-serif text-secondary text-4xl font-bold my-10">
404 File not found
</h1>
<a href={localizePath(lang, "/")} class="btn btn-primary">
<a href={localizePath("en", "/")} class="btn btn-primary">
{t("home")}
</a>
</div>
Expand Down
7 changes: 5 additions & 2 deletions frontend/src/pages/[...locale]/terms-of-use.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ import { changeLanguage } from "i18next";
import TermsOfUsePage from "../../components/react/pages/TermsOfUse";
import Base from "../../layouts/Base.astro";
const { lang = "en" } = Astro.params;
changeLanguage(lang);
import { buildStaticPaths } from "astro-react-i18next/utils";
export function getStaticPaths() {
return buildStaticPaths();
}
---

<Base title="Terms of Use">
Expand Down
7 changes: 5 additions & 2 deletions frontend/src/pages/[...locale]/thankyou.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ import { changeLanguage } from "i18next";
import { JoinLoopConfirmation as JoinLoopConfirmationPage } from "../../components/react/pages/Thankyou";
import Base from "../../layouts/Base.astro";
const { lang = "en" } = Astro.params;
changeLanguage(lang);
import { buildStaticPaths } from "astro-react-i18next/utils";
export function getStaticPaths() {
return buildStaticPaths();
}
---

<Base title="Thank you for joining">
Expand Down

0 comments on commit f0f7dd7

Please sign in to comment.