diff --git a/app/pages/Collections.tsx b/app/pages/Collections.tsx index ae3d480..54abe73 100644 --- a/app/pages/Collections.tsx +++ b/app/pages/Collections.tsx @@ -7,11 +7,12 @@ const fetcher = (...args: any) => import { useUserStore } from "#/store/auth"; import { ENDPOINTS } from "#/api/config"; import { useRouter } from "next/navigation"; -import { useEffect } from "react"; +import { useEffect, useState } from "react"; export function CollectionsPage() { const userStore = useUserStore(); const router = useRouter(); + const [searchVal, setSearchVal] = useState(""); function useFetchReleases(section: string) { let url: string; @@ -47,6 +48,55 @@ export function CollectionsPage() { )} +
{ + e.preventDefault(); + router.push(`/search?q=${searchVal}&where=collections`); + }} + > + +
+
+ +
+ setSearchVal(e.target.value)} + /> + +
+
+ {userCollections && userCollections.content && ( { if (previousPageData && !previousPageData.content.length) return null; @@ -79,6 +80,55 @@ export function FavoritesPage() { return ( <> +
{ + e.preventDefault(); + router.push(`/search?q=${searchVal}&where=favorites`); + }} + > + +
+
+ +
+ setSearchVal(e.target.value)} + /> + +
+
+

Избранное diff --git a/app/pages/History.tsx b/app/pages/History.tsx index 333a895..19bf43b 100644 --- a/app/pages/History.tsx +++ b/app/pages/History.tsx @@ -28,6 +28,7 @@ export function HistoryPage() { const authState = useUserStore((state) => state.state); const [isLoadingEnd, setIsLoadingEnd] = useState(false); const router = useRouter(); + const [searchVal, setSearchVal] = useState(""); const getKey = (pageIndex: number, previousPageData: any) => { if (previousPageData && !previousPageData.content.length) return null; @@ -71,6 +72,54 @@ export function HistoryPage() { return ( <> +
{ + e.preventDefault(); + router.push(`/search?q=${searchVal}&where=history`); + }} + > + +
+
+ +
+ setSearchVal(e.target.value)} + /> + +
+
{content && content.length > 0 ? ( <>