diff options
| author | Maze Winther <mazewinther@gmail.com> | 2025-08-04 02:59:07 +0200 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2025-08-04 02:59:07 +0200 |
| commit | acc2089d0d6975d9cede833b083f9d1d2f78504d (patch) | |
| tree | 4697e16e1c3e92711e1bb92e8504b2634c6d6d46 /apps/web/src/stores | |
| parent | 35ade4b25f417e0d7c4d155b8afc51fb94ebcdd7 (diff) | |
| download | opencut-acc2089d0d6975d9cede833b083f9d1d2f78504d.tar.gz | |
feat: add license filtering for sound effects
Diffstat (limited to 'apps/web/src/stores')
| -rw-r--r-- | apps/web/src/stores/sounds-store.ts | 9 |
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: "",
|
