update <a> with <Link>

This commit is contained in:
Matthias Nannt
2023-02-08 14:11:58 +01:00
parent 9c4b2e99ae
commit 3af58e80d2
3 changed files with 11 additions and 10 deletions

View File

@@ -110,23 +110,23 @@ export const SignupForm = () => {
By clicking &quot;Sign Up&quot;, you agree to our
<br />
{process.env.NEXT_PUBLIC_TERMS_URL && (
<a
<Link
className="text-brand hover:text-brand-light underline"
href={process.env.NEXT_PUBLIC_TERMS_URL}
rel="noreferrer"
target="_blank">
terms of service
</a>
</Link>
)}
{process.env.NEXT_PUBLIC_TERMS_URL && process.env.NEXT_PUBLIC_PRIVACY_URL && <span> and </span>}
{process.env.NEXT_PUBLIC_PRIVACY_URL && (
<a
<Link
className="text-brand hover:text-brand-light underline"
href={process.env.NEXT_PUBLIC_PRIVACY_URL}
rel="noreferrer"
target="_blank">
privacy policy
</a>
</Link>
)}
.<br />
We&apos;ll occasionally send you account related emails.

View File

@@ -5,6 +5,7 @@ import LoadingSpinner from "@/components/LoadingSpinner";
import { useSubmissions } from "@/lib/submissions";
import { Dialog, Transition } from "@headlessui/react";
import { InboxIcon, XMarkIcon } from "@heroicons/react/24/outline";
import Link from "next/link";
import { useRouter } from "next/router";
import { Fragment, useEffect, useState } from "react";
import FilterNavigation from "../shared/FilterNavigation";
@@ -86,9 +87,9 @@ export default function FeedbackResults() {
<ul role="list" className="px-2 py-3 font-medium text-gray-900">
{subCategories.map((category) => (
<li key={category.name}>
<a href={category.href} className="block px-2 py-3">
<Link href={category.href} className="block px-2 py-3">
{category.name}
</a>
</Link>
</li>
))}
</ul>

View File

@@ -2,6 +2,7 @@ import { CustomersIcon, DashboardIcon, FormIcon } from "@formbricks/ui";
import { Disclosure } from "@headlessui/react";
import { Bars3Icon, XMarkIcon } from "@heroicons/react/24/outline";
import clsx from "clsx";
import Link from "next/link";
import { useRouter } from "next/router";
import { useMemo } from "react";
@@ -54,7 +55,7 @@ export default function LayoutWrapperOrganisation({ children }: LayoutWrapperOrg
</div>
<div className="hidden lg:flex lg:space-x-4">
{navigation.map((item) => (
<a
<Link
key={item.name}
href={item.href}
className={clsx(
@@ -66,7 +67,7 @@ export default function LayoutWrapperOrganisation({ children }: LayoutWrapperOrg
aria-current={item.current ? "page" : undefined}>
<item.icon className="mr-3 h-5 w-5" />
{item.name}
</a>
</Link>
))}
</div>
</nav>
@@ -77,8 +78,7 @@ export default function LayoutWrapperOrganisation({ children }: LayoutWrapperOrg
{navigation.map((item) => (
<Disclosure.Button
key={item.name}
as="a"
href={item.href}
onClick={() => router.push(item.href)}
className={clsx(
item.current
? "bg-gray-100 text-gray-900"