File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
apps/renderer/src/pages/(external)/(with-layout)/profile/[id] Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -12,19 +12,19 @@ import { usePresentFeedFormModal } from "~/hooks/biz/useFeedFormModal"
12
12
import { useAuthQuery , useI18n , useTitle } from "~/hooks/common"
13
13
import { apiClient } from "~/lib/api-fetch"
14
14
import { defineQuery } from "~/lib/defineQuery"
15
- import { cn } from "~/lib/utils"
15
+ import { cn , isBizId } from "~/lib/utils"
16
16
import { useUserSubscriptionsQuery } from "~/modules/profile/hooks"
17
17
18
18
export function Component ( ) {
19
19
const t = useI18n ( )
20
20
const { id } = useParams ( )
21
21
22
- const isHandle = id ? .startsWith ( "@" )
22
+ const isHandle = id ? id . startsWith ( "@" ) || ! isBizId ( id ) : false
23
23
const user = useAuthQuery (
24
24
defineQuery ( [ "profiles" , id ] , async ( ) => {
25
25
const res = await apiClient . profiles . $get ( {
26
26
query : {
27
- handle : isHandle ? id ?. slice ( 1 ) : undefined ,
27
+ handle : isHandle ? ( id ?. startsWith ( "@" ) ? id . slice ( 1 ) : id ) : undefined ,
28
28
id : isHandle ? undefined : id ,
29
29
} ,
30
30
} )
You can’t perform that action at this time.
0 commit comments