diff options
| author | Dhravya <[email protected]> | 2024-04-08 12:07:55 -0700 |
|---|---|---|
| committer | Dhravya <[email protected]> | 2024-04-08 12:07:55 -0700 |
| commit | 490ad332ff493ed269dc39cd6f57a8ce65a0db33 (patch) | |
| tree | e95d157fbc45342f3ef64a8361c0eeae33d9fb61 /apps/web/src/contexts | |
| parent | better phone controls (diff) | |
| download | supermemory-490ad332ff493ed269dc39cd6f57a8ce65a0db33.tar.xz supermemory-490ad332ff493ed269dc39cd6f57a8ce65a0db33.zip | |
aggregate content from same space
Diffstat (limited to 'apps/web/src/contexts')
| -rw-r--r-- | apps/web/src/contexts/MemoryContext.tsx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/web/src/contexts/MemoryContext.tsx b/apps/web/src/contexts/MemoryContext.tsx index eab1e4fe..820736ff 100644 --- a/apps/web/src/contexts/MemoryContext.tsx +++ b/apps/web/src/contexts/MemoryContext.tsx @@ -1,6 +1,6 @@ -"use client"; -import React, { useCallback } from "react"; -import { CollectedSpaces } from "../../types/memory"; +'use client'; +import React, { useCallback } from 'react'; +import { CollectedSpaces } from '../../types/memory'; // temperory (will change) export const MemoryContext = React.createContext<{ @@ -31,6 +31,8 @@ export const MemoryProvider: React.FC< [spaces], ); + console.log(spaces); + return ( <MemoryContext.Provider value={{ spaces, addSpace, deleteSpace }}> {children} @@ -41,7 +43,7 @@ export const MemoryProvider: React.FC< export const useMemory = () => { const context = React.useContext(MemoryContext); if (context === undefined) { - throw new Error("useMemory must be used within a MemoryProvider"); + throw new Error('useMemory must be used within a MemoryProvider'); } return context; }; |