Skip to content

Commit

Permalink
don't use client stuff for back link
Browse files Browse the repository at this point in the history
  • Loading branch information
MikaelSiidorow committed Jan 25, 2024
1 parent 5e3b6f4 commit 47bba26
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 27 deletions.
25 changes: 0 additions & 25 deletions web/app/[locale]/terms/BackLink.tsx

This file was deleted.

8 changes: 6 additions & 2 deletions web/app/[locale]/terms/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { fetchAPI } from "@/lib/api";
import { StrapiBaseType } from "@/utils/models";
import { getTranslation } from "@/utils/translationHelper";
import { TermsContent } from "./Content";
import { BackLink } from "./BackLink";

export const dynamic = "force-dynamic";
type Fields = StrapiBaseType<{
Expand Down Expand Up @@ -41,7 +40,12 @@ const Terms = async ({ params: { locale } }: Props) => {
gdpr={content.attributes.gdpr}
/>
<div className="my-4">
<BackLink backText={translation.back} />
<button
onClick={() => window.history.back()}
className="underline text-primary-900 dark:text-primary-500"
>
{translation.back}
</button>
</div>
</div>
);
Expand Down

0 comments on commit 47bba26

Please sign in to comment.