Spaces:
Paused
Paused
matt HOFFNER
commited on
Commit
·
cb43691
1
Parent(s):
e35a983
debug
Browse files
src/app/search/web/page.jsx
CHANGED
|
@@ -3,11 +3,12 @@ import { useEffect, useState } from "react";
|
|
| 3 |
import { MemoizedReactMarkdown } from '../../../components/MemoizedReactMarkdown'
|
| 4 |
import { CodeBlock } from '../../../components/CodeBlock';
|
| 5 |
|
| 6 |
-
export default function WebSearchPage({ searchParams }) {
|
| 7 |
const [aiResponse, setAiResponse] = useState("");
|
| 8 |
const [searchTerm, setSearchTerm] = useState()
|
| 9 |
|
| 10 |
useEffect(() => {
|
|
|
|
| 11 |
setSearchTerm(searchParams.searchTerm)
|
| 12 |
}, [searchParams])
|
| 13 |
|
|
@@ -47,9 +48,7 @@ export default function WebSearchPage({ searchParams }) {
|
|
| 47 |
fetchData();
|
| 48 |
|
| 49 |
return () => controller.abort();
|
| 50 |
-
}, [searchParams, searchTerm]);
|
| 51 |
-
|
| 52 |
-
console.log(aiResponse);
|
| 53 |
|
| 54 |
return (
|
| 55 |
<div style={{ padding: "20px" }} className="flex flex-row">
|
|
|
|
| 3 |
import { MemoizedReactMarkdown } from '../../../components/MemoizedReactMarkdown'
|
| 4 |
import { CodeBlock } from '../../../components/CodeBlock';
|
| 5 |
|
| 6 |
+
export default function WebSearchPage({ params, searchParams }) {
|
| 7 |
const [aiResponse, setAiResponse] = useState("");
|
| 8 |
const [searchTerm, setSearchTerm] = useState()
|
| 9 |
|
| 10 |
useEffect(() => {
|
| 11 |
+
console.log(params, searchParams);
|
| 12 |
setSearchTerm(searchParams.searchTerm)
|
| 13 |
}, [searchParams])
|
| 14 |
|
|
|
|
| 48 |
fetchData();
|
| 49 |
|
| 50 |
return () => controller.abort();
|
| 51 |
+
}, [searchParams, searchTerm]);
|
|
|
|
|
|
|
| 52 |
|
| 53 |
return (
|
| 54 |
<div style={{ padding: "20px" }} className="flex flex-row">
|