repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources16d ago| #1 | import { useDispatch, useSelector } from 'react-redux'; |
| #2 | import { AppDispatch, RootState } from '@/store/store'; |
| #3 | import { openUpdateMemoryDialog, closeUpdateMemoryDialog } from '@/store/uiSlice'; |
| #4 | |
| #5 | export const useUI = () => { |
| #6 | const dispatch = useDispatch<AppDispatch>(); |
| #7 | const updateMemoryDialog = useSelector((state: RootState) => state.ui.dialogs.updateMemory); |
| #8 | |
| #9 | const handleOpenUpdateMemoryDialog = (memoryId: string, memoryContent: string) => { |
| #10 | dispatch(openUpdateMemoryDialog({ memoryId, memoryContent })); |
| #11 | }; |
| #12 | |
| #13 | const handleCloseUpdateMemoryDialog = () => { |
| #14 | dispatch(closeUpdateMemoryDialog()); |
| #15 | }; |
| #16 | |
| #17 | return { |
| #18 | updateMemoryDialog, |
| #19 | handleOpenUpdateMemoryDialog, |
| #20 | handleCloseUpdateMemoryDialog, |
| #21 | }; |
| #22 | }; |