'init'
This commit is contained in:
12
app/providers/MemoryProvider/useMemoryClean.ts
Normal file
12
app/providers/MemoryProvider/useMemoryClean.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { useContext } from "react";
|
||||
import { MemoryContext } from "./MemoryProvider";
|
||||
|
||||
export function useMemoryClean() {
|
||||
const {setMemory} = useContext(MemoryContext);
|
||||
|
||||
const clean = () => {
|
||||
setMemory({});
|
||||
}
|
||||
|
||||
return clean;
|
||||
}
|
||||
Reference in New Issue
Block a user