Spaces:
Paused
Paused
matt HOFFNER
commited on
Commit
·
f3b4042
1
Parent(s):
cb43691
handle server side props
Browse files- src/app/search/web/page.jsx +10 -0
src/app/search/web/page.jsx
CHANGED
@@ -104,3 +104,13 @@ export default function WebSearchPage({ params, searchParams }) {
|
|
104 |
</div>
|
105 |
);
|
106 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
</div>
|
105 |
);
|
106 |
}
|
107 |
+
|
108 |
+
export async function getServerSideProps(context) {
|
109 |
+
// You can access the query parameters of the request with context.query
|
110 |
+
const searchParams = context.query;
|
111 |
+
|
112 |
+
// TODO: Perform any necessary operations with searchParams
|
113 |
+
|
114 |
+
// Return searchParams as a prop to your page
|
115 |
+
return { props: { searchParams } };
|
116 |
+
}
|