File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change
1
+ import { useAtomValue } from 'jotai'
1
2
import { noop } from 'lodash-es'
2
3
import {
3
4
CopilotSetPageRes ,
@@ -12,6 +13,7 @@ import { OperationSetApi } from 'utils/maa-copilot-client'
12
13
import { useSWRRefresh } from 'utils/swr'
13
14
14
15
import { parseShortCode } from '../models/shortCode'
16
+ import { authAtom } from '../store/auth'
15
17
16
18
export type OrderBy = 'views' | 'hot' | 'id'
17
19
@@ -29,6 +31,7 @@ export function useOperationSets({
29
31
disabled,
30
32
suspense,
31
33
} : UseOperationSetsParams ) {
34
+ const auth = useAtomValue ( authAtom )
32
35
const {
33
36
data : pages ,
34
37
error,
@@ -49,7 +52,7 @@ export function useOperationSets({
49
52
limit : 50 ,
50
53
page : pageIndex + 1 ,
51
54
keyword,
52
- creatorId,
55
+ creatorId : creatorId === 'me' ? auth . userId : creatorId ,
53
56
} satisfies CopilotSetQuery ,
54
57
]
55
58
} ,
You can’t perform that action at this time.
0 commit comments