vrsao 2
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-10-08 14:02:01 +02:00
parent bdd766c68a
commit 1106509116
354 changed files with 48275 additions and 24635 deletions
@@ -1,5 +1,5 @@
import { Link } from "@inertiajs/react";
import { useEffect, useState } from "react";
import { Link } from '@inertiajs/react';
import { useEffect, useState } from 'react';
export default function PartnershipSearchResults({ query }: { query: string }) {
const [items, setItems] = useState<{ id: number; title: string }[]>([]);
useEffect(() => {
@@ -8,9 +8,9 @@ export default function PartnershipSearchResults({ query }: { query: string }) {
return;
}
const controller = new AbortController();
fetch("/api/v1/partnerships?q=" + encodeURIComponent(query), {
fetch('/api/v1/partnerships?q=' + encodeURIComponent(query), {
signal: controller.signal,
headers: { Accept: "application/json" },
headers: { Accept: 'application/json' },
})
.then((r) => (r.ok ? r.json() : null))
.then((data) => setItems(data?.data ?? []))
@@ -23,14 +23,14 @@ export default function PartnershipSearchResults({ query }: { query: string }) {
<h2 className="text-xl font-bold">Parcerias nesta pesquisa</h2>
{items.slice(0, 5).map((item) => (
<p key={item.id}>
<Link className="underline" href={"/parcerias/" + item.id}>
<Link className="underline" href={'/parcerias/' + item.id}>
{item.title}
</Link>
</p>
))}
<Link
className="underline"
href={"/parcerias?q=" + encodeURIComponent(query)}
href={'/parcerias?q=' + encodeURIComponent(query)}
>
Ver todas as parcerias correspondentes
</Link>