Spaces:
Paused
Paused
matt HOFFNER
commited on
Commit
·
b0c21fa
1
Parent(s):
bf2fc3e
fix
Browse files
src/app/search/web/page.jsx
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
"use client"
|
2 |
import { useEffect, useState } from "react";
|
|
|
3 |
|
4 |
export default function WebSearchPage({ searchParams }) {
|
5 |
const [aiResponse, setAiResponse] = useState("");
|
|
|
1 |
"use client"
|
2 |
import { useEffect, useState } from "react";
|
3 |
+
import { MemoizedReactMarkdown } from '../../../components/MemoizedReactMarkdown'
|
4 |
|
5 |
export default function WebSearchPage({ searchParams }) {
|
6 |
const [aiResponse, setAiResponse] = useState("");
|
src/components/WebSearchResults.jsx
CHANGED
@@ -1,6 +1,3 @@
|
|
1 |
-
import Link from "next/link";
|
2 |
-
import Parser from "html-react-parser";
|
3 |
-
import PaginationButtons from "./PaginationButtons";
|
4 |
import { MemoizedReactMarkdown } from './MemoizedReactMarkdown';
|
5 |
|
6 |
export default function WebSearchResults({ aiResponse, results }) {
|
@@ -59,30 +56,6 @@ export default function WebSearchResults({ aiResponse, results }) {
|
|
59 |
</MemoizedReactMarkdown>
|
60 |
</div>
|
61 |
</div>
|
62 |
-
<div className="flex-grow">
|
63 |
-
<p className="text-gray-600 text-sm mb-5 mt-3">
|
64 |
-
About {results.searchInformation?.formattedTotalResults} results (
|
65 |
-
{results.searchInformation?.formattedSearchTime} seconds)
|
66 |
-
</p>
|
67 |
-
{results.items?.map((result) => (
|
68 |
-
<div className="mb-8 max-w-xl" key={result.link}>
|
69 |
-
<div className="group flex flex-col">
|
70 |
-
<Link rel="noopener noreferrer" target="_blank" className="text-sm truncate" href={result.link}>
|
71 |
-
{result.formattedUrl}
|
72 |
-
</Link>
|
73 |
-
<Link
|
74 |
-
rel="noopener noreferrer" target="_blank"
|
75 |
-
className="group-hover:underline decoration-blue-800 text-xl truncate font-medium text-blue-800"
|
76 |
-
href={result.link}
|
77 |
-
>
|
78 |
-
{result.title}
|
79 |
-
</Link>
|
80 |
-
</div>
|
81 |
-
<p className="text-gray-600">{Parser(result.htmlSnippet)}</p>
|
82 |
-
</div>
|
83 |
-
))}
|
84 |
-
<PaginationButtons />
|
85 |
-
</div>
|
86 |
</div>
|
87 |
);
|
88 |
}
|
|
|
|
|
|
|
|
|
1 |
import { MemoizedReactMarkdown } from './MemoizedReactMarkdown';
|
2 |
|
3 |
export default function WebSearchResults({ aiResponse, results }) {
|
|
|
56 |
</MemoizedReactMarkdown>
|
57 |
</div>
|
58 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
</div>
|
60 |
);
|
61 |
}
|