feat: add license filtering for sound effects

This commit is contained in:
Maze Winther
2025-08-04 02:59:07 +02:00
parent 35ade4b25f
commit acc2089d0d
6 changed files with 84 additions and 15 deletions
+2 -1
View File
@@ -9,7 +9,7 @@ import { useSoundsStore } from "@/stores/sounds-store";
* - Proper error handling
*/
export function useSoundSearch(query: string) {
export function useSoundSearch(query: string, commercialOnly: boolean) {
const {
searchResults,
isSearching,
@@ -49,6 +49,7 @@ export function useSoundSearch(query: string) {
searchParams.set("q", query);
}
searchParams.set("commercial_only", commercialOnly.toString());
const response = await fetch(
`/api/sounds/search?${searchParams.toString()}`
);