summaryrefslogtreecommitdiff
path: root/extension/react-app/src/redux/hooks.ts
diff options
context:
space:
mode:
authorNate Sesti <33237525+sestinj@users.noreply.github.com>2023-08-06 22:54:51 -0700
committerGitHub <noreply@github.com>2023-08-06 22:54:51 -0700
commit74005855304412f0401e29c83c166e99a8ab0944 (patch)
tree4e8ddb61fd52068e839ca4ccab268e013405d545 /extension/react-app/src/redux/hooks.ts
parenta0d3f29ee237484c66b0efe243c79d902f2da993 (diff)
parent8ada89b0f66f9e746394ee64591359537fe0c7f0 (diff)
downloadsncontinue-74005855304412f0401e29c83c166e99a8ab0944.tar.gz
sncontinue-74005855304412f0401e29c83c166e99a8ab0944.tar.bz2
sncontinue-74005855304412f0401e29c83c166e99a8ab0944.zip
Merge pull request #351 from continuedev/history
Session History
Diffstat (limited to 'extension/react-app/src/redux/hooks.ts')
-rw-r--r--extension/react-app/src/redux/hooks.ts21
1 files changed, 0 insertions, 21 deletions
diff --git a/extension/react-app/src/redux/hooks.ts b/extension/react-app/src/redux/hooks.ts
deleted file mode 100644
index a6aef869..00000000
--- a/extension/react-app/src/redux/hooks.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import { useCallback } from "react";
-import { useDispatch, useSelector } from "react-redux";
-import { RootStore } from "./store";
-import { selectDebugContextValue } from "./selectors/debugContextSelectors";
-import { updateValue } from "./slices/debugContexSlice";
-import { SerializedDebugContext } from "../../../src/client";
-
-export function useDebugContextValue(
- key: keyof SerializedDebugContext,
- defaultValue: any
-): [any, (value: any) => void] {
- const dispatch = useDispatch();
- const state =
- useSelector((state: RootStore) => selectDebugContextValue(state, key)) ||
- defaultValue;
- const boundAction = useCallback(
- (value: any) => dispatch(updateValue({ key, value })),
- [dispatch, key]
- );
- return [state, boundAction];
-}