Spaces:
Configuration error
Configuration error
Download src/components/hooks/useModified.ts from SreejithSHR/umami: direct link, hf CLI and curl.
- Browser
- Download file 320 Bytes
-
https://huggingface.co/spaces/SreejithSHR/umami/resolve/main/src/components/hooks/useModified.ts
- Command line
-
hf download hf://spaces/SreejithSHR/umami/src/components/hooks/useModified.ts
-
curl -L -o useModified.ts https://huggingface.co/spaces/SreejithSHR/umami/resolve/main/src/components/hooks/useModified.ts
320 Bytes
| import useStore from 'store/modified'; | |
| export function useModified(key?: string) { | |
| const modified = useStore(state => state?.[key]); | |
| const touch = (id?: string) => { | |
| if (id || key) { | |
| useStore.setState({ [id || key]: Date.now() }); | |
| } | |
| }; | |
| return { modified, touch }; | |
| } | |
| export default useModified; | |