Spaces:
Running
Running
Download algospaced-ui/src/hooks/useSandboxRunner.ts from iamfebin/algospaced-dsa: direct link, hf CLI and curl.
- Browser
- Download file 892 Bytes
-
https://huggingface.co/spaces/iamfebin/algospaced-dsa/resolve/main/algospaced-ui/src/hooks/useSandboxRunner.ts
- Command line
-
hf download hf://spaces/iamfebin/algospaced-dsa/algospaced-ui/src/hooks/useSandboxRunner.ts
-
curl -L -o useSandboxRunner.ts https://huggingface.co/spaces/iamfebin/algospaced-dsa/resolve/main/algospaced-ui/src/hooks/useSandboxRunner.ts
892 Bytes
| import { useProcessStore } from '../stores/useProcessStore'; | |
| export function useSandboxRunner() { | |
| const sandboxRunning = useProcessStore(s => s.sandboxRunning); | |
| const sandboxResults = useProcessStore(s => s.sandboxResults); | |
| const sandboxError = useProcessStore(s => s.sandboxError); | |
| const savingReference = useProcessStore(s => s.savingReference); | |
| const savedRefSuccess = useProcessStore(s => s.savedRefSuccess); | |
| const saveRefError = useProcessStore(s => s.saveRefError); | |
| const handleRunSandbox = useProcessStore(s => s.handleRunSandbox); | |
| const handleSaveReference = useProcessStore(s => s.handleSaveReference); | |
| const resetSandbox = useProcessStore(s => s.resetSandbox); | |
| return { | |
| sandboxRunning, | |
| sandboxResults, | |
| sandboxError, | |
| savingReference, | |
| savedRefSuccess, | |
| saveRefError, | |
| handleRunSandbox, | |
| handleSaveReference, | |
| resetSandbox | |
| }; | |
| } | |