File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 1
1
import { Button , ButtonGroup , Card } from '@blueprintjs/core'
2
2
3
+ import { useAtom } from 'jotai'
3
4
import { ComponentType , useState } from 'react'
4
5
import { Navigate , useParams } from 'react-router-dom'
5
6
6
7
import { OperationList } from 'components/OperationList'
7
8
import { OperationSetList } from 'components/OperationSetList'
8
9
import { OperationDrawer } from 'components/drawer/OperationDrawer'
10
+ import { authAtom } from 'store/auth'
9
11
10
12
import { useUserInfo } from '../apis/user'
11
13
import { CardTitle } from '../components/CardTitle'
@@ -21,6 +23,8 @@ const _ProfilePage: ComponentType = () => {
21
23
22
24
const { data : userInfo } = useUserInfo ( { userId : id , suspense : true } )
23
25
26
+ const [ authState , _setAuthState ] = useAtom ( authAtom )
27
+
24
28
const [ listMode , setListMode ] = useState < 'operation' | 'operationSet' > (
25
29
'operation' ,
26
30
)
@@ -54,7 +58,7 @@ const _ProfilePage: ComponentType = () => {
54
58
< OperationList
55
59
limit = { 10 }
56
60
orderBy = "id"
57
- uploaderId = { id }
61
+ uploaderId = { authState . userId == id ? 'me' : id }
58
62
onUpdate = { ( { total } ) => setOperationCount ( total ) }
59
63
/>
60
64
) }
You can’t perform that action at this time.
0 commit comments