Add account browsing simulation

This commit is contained in:
jjbrunton committed 2026-08-11 21:40:31 +01:00
1 parent e2d7dc4b82
commit 27012399ec
31 files changed
+1476 -28

No files matched your search

@@ -1,6 +1,7 @@
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
import type {
GrowthAccountDetail,
BrowsingSettingsUpdateRequest,
GrowthSettingsUpdateRequest,
GrowthSubredditCreateRequest,
GrowthSubredditUpdateRequest,
@@ -13,6 +14,7 @@ import {
removeGrowthSubreddit,
resumeGrowth,
updateGrowthSettings,
updateBrowsingSettings,
updateGrowthSubreddit,
} from './growth-api.js';
@@ -63,6 +65,13 @@ export function useUpdateGrowthSettingsMutation(accountId: string) {
);
}
export function useUpdateBrowsingSettingsMutation(accountId: string) {
return useGrowthMutation(
accountId,
(update: BrowsingSettingsUpdateRequest) => updateBrowsingSettings(accountId, update),
);
}
export function usePauseGrowthMutation(accountId: string) {
return useGrowthMutation(accountId, (reason?: string) => pauseGrowth(accountId, reason));
}