summaryrefslogtreecommitdiff
path: root/apps/web/src/stores/sounds-store.ts
diff options
context:
space:
mode:
Diffstat (limited to 'apps/web/src/stores/sounds-store.ts')
-rw-r--r--apps/web/src/stores/sounds-store.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/web/src/stores/sounds-store.ts b/apps/web/src/stores/sounds-store.ts
index 3771c07e..215253fb 100644
--- a/apps/web/src/stores/sounds-store.ts
+++ b/apps/web/src/stores/sounds-store.ts
@@ -13,6 +13,10 @@ interface SoundsStore {
error: string | null;
hasLoaded: boolean;
+ // Filter state
+ showCommercialOnly: boolean;
+ toggleCommercialFilter: () => void;
+
// Search state
searchQuery: string;
searchResults: SoundEffect[];
@@ -72,6 +76,11 @@ export const useSoundsStore = create<SoundsStore>((set, get) => ({
isLoading: false,
error: null,
hasLoaded: false,
+ showCommercialOnly: true,
+
+ toggleCommercialFilter: () => {
+ set((state) => ({ showCommercialOnly: !state.showCommercialOnly }));
+ },
// Search state
searchQuery: "",