File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ export function useThreadList(userId: string): ThreadListProps {
67
67
}
68
68
69
69
fetchThreads ( ) ;
70
- } , [ offset ] ) ;
70
+ } , [ offset , userId ] ) ;
71
71
72
72
const loadMoreThreads = useCallback ( ( ) => {
73
73
if ( areThreadsLoading ) {
@@ -80,15 +80,15 @@ export function useThreadList(userId: string): ThreadListProps {
80
80
const saved = await client . threads . create ( { metadata : { name, userId } } ) ;
81
81
dispatch ( { type : "add" , threads : [ saved ] } ) ;
82
82
return saved ;
83
- } , [ ] ) ;
83
+ } , [ userId ] ) ;
84
84
85
85
const updateThread = useCallback ( async ( thread_id : string , name : string ) => {
86
86
const saved = await client . threads . update ( thread_id , {
87
87
metadata : { name, userId } ,
88
88
} ) ;
89
89
dispatch ( { type : "add" , threads : [ saved ] } ) ;
90
90
return saved ;
91
- } , [ ] ) ;
91
+ } , [ userId ] ) ;
92
92
93
93
const deleteThread = useCallback (
94
94
async ( thread_id : string ) => {
You can’t perform that action at this time.
0 commit comments