Spaces:
Paused
Paused
matt HOFFNER
commited on
Commit
·
b44cd96
1
Parent(s):
a9a04a1
cleanup
Browse files
src/app/search/web/page.jsx
CHANGED
@@ -32,5 +32,5 @@ export default async function WebSearchPage({ searchParams }) {
|
|
32 |
</div>
|
33 |
);
|
34 |
}
|
35 |
-
return <>{results &&
|
36 |
}
|
|
|
32 |
</div>
|
33 |
);
|
34 |
}
|
35 |
+
return <>{results && <><WebSearchResults results={data} /><WebSearchResults results={data} /></>}</>;
|
36 |
}
|
src/components/ImageSearchResults.jsx
CHANGED
@@ -15,12 +15,12 @@ export default function ImageSearchResults({ results }) {
|
|
15 |
className="h-60 group-hover:shadow-xl w-full object-contain transition-shadow"
|
16 |
/>
|
17 |
</Link>
|
18 |
-
<Link href={result.image.contextLink}>
|
19 |
<h2 className="group-hover:underline truncate text-xl">
|
20 |
{result.title}
|
21 |
</h2>
|
22 |
</Link>
|
23 |
-
<Link href={result.image.contextLink}>
|
24 |
<p className="group-hover:underline text-gray-600">
|
25 |
{result.displayLink}
|
26 |
</p>
|
|
|
15 |
className="h-60 group-hover:shadow-xl w-full object-contain transition-shadow"
|
16 |
/>
|
17 |
</Link>
|
18 |
+
<Link rel="noopener noreferrer" target="_blank" href={result.image.contextLink}>
|
19 |
<h2 className="group-hover:underline truncate text-xl">
|
20 |
{result.title}
|
21 |
</h2>
|
22 |
</Link>
|
23 |
+
<Link rel="noopener noreferrer" target="_blank" href={result.image.contextLink}>
|
24 |
<p className="group-hover:underline text-gray-600">
|
25 |
{result.displayLink}
|
26 |
</p>
|
src/components/SearchHeaderOptions.jsx
CHANGED
@@ -12,14 +12,6 @@ export default function SearchHeaderOptions() {
|
|
12 |
}
|
13 |
return (
|
14 |
<div className="flex space-x-2 select-none border-b w-full justify-center lg:justify-start lg:pl-52 text-gray-700 text-sm">
|
15 |
-
<div onClick={()=>selectTab("All")} className={`flex items-center space-x-1 border-b-4 border-transparent active:text-blue-500 cursor-pointer pb-3 px-2 ${pathname === "/search/web" && "!text-blue-600 !border-blue-600"}`}>
|
16 |
-
<AiOutlineSearch className="text-md"/>
|
17 |
-
<p>All</p>
|
18 |
-
</div>
|
19 |
-
<div onClick={()=>selectTab("Images")} className={`flex items-center space-x-1 border-b-4 border-transparent active:text-blue-500 cursor-pointer pb-3 px-2 ${pathname === "/search/image" && "!text-blue-600 !border-blue-600"}`}>
|
20 |
-
<AiOutlineCamera className="text-md"/>
|
21 |
-
<p>Images</p>
|
22 |
-
</div>
|
23 |
</div>
|
24 |
)
|
25 |
}
|
|
|
12 |
}
|
13 |
return (
|
14 |
<div className="flex space-x-2 select-none border-b w-full justify-center lg:justify-start lg:pl-52 text-gray-700 text-sm">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
</div>
|
16 |
)
|
17 |
}
|
src/components/WebSearchResults.jsx
CHANGED
@@ -12,10 +12,11 @@ export default function WebSearchResults({ results }) {
|
|
12 |
{results.items?.map((result) => (
|
13 |
<div className="mb-8 max-w-xl" key={result.link}>
|
14 |
<div className="group flex flex-col">
|
15 |
-
<Link className="text-sm truncate" href={result.link}>
|
16 |
{result.formattedUrl}
|
17 |
</Link>
|
18 |
<Link
|
|
|
19 |
className="group-hover:underline decoration-blue-800 text-xl truncate font-medium text-blue-800"
|
20 |
href={result.link}
|
21 |
>
|
|
|
12 |
{results.items?.map((result) => (
|
13 |
<div className="mb-8 max-w-xl" key={result.link}>
|
14 |
<div className="group flex flex-col">
|
15 |
+
<Link rel="noopener noreferrer" target="_blank" className="text-sm truncate" href={result.link}>
|
16 |
{result.formattedUrl}
|
17 |
</Link>
|
18 |
<Link
|
19 |
+
rel="noopener noreferrer" target="_blank"
|
20 |
className="group-hover:underline decoration-blue-800 text-xl truncate font-medium text-blue-800"
|
21 |
href={result.link}
|
22 |
>
|