Fix type errors
This commit is contained in:
@@ -77,9 +77,9 @@ let ProfileHeaderLabeler = ({
|
|||||||
variables?.subscribe ??
|
variables?.subscribe ??
|
||||||
preferences?.moderationPrefs.mods.find(mod => mod.did === profile.did)
|
preferences?.moderationPrefs.mods.find(mod => mod.did === profile.did)
|
||||||
const canSubscribe =
|
const canSubscribe =
|
||||||
isSubscribed || preferences
|
isSubscribed || (preferences
|
||||||
? preferences.moderationPrefs.mods.length < 10
|
? preferences?.moderationPrefs.mods.length < 10
|
||||||
: false
|
: false)
|
||||||
const {mutateAsync: likeMod, isPending: isLikePending} = useLikeMutation()
|
const {mutateAsync: likeMod, isPending: isLikePending} = useLikeMutation()
|
||||||
const {mutateAsync: unlikeMod, isPending: isUnlikePending} =
|
const {mutateAsync: unlikeMod, isPending: isUnlikePending} =
|
||||||
useUnlikeMutation()
|
useUnlikeMutation()
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ export const ProfileLabelsSection = React.forwardRef<
|
|||||||
const {height: minHeight} = useSafeAreaFrame()
|
const {height: minHeight} = useSafeAreaFrame()
|
||||||
|
|
||||||
const onScrollToTop = React.useCallback(() => {
|
const onScrollToTop = React.useCallback(() => {
|
||||||
|
// @ts-ignore TODO fix this
|
||||||
scrollElRef.current?.scrollTo({
|
scrollElRef.current?.scrollTo({
|
||||||
animated: isNative,
|
animated: isNative,
|
||||||
x: 0,
|
x: 0,
|
||||||
@@ -143,6 +144,7 @@ export function ProfileLabelsSectionInner({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<ScrollView
|
<ScrollView
|
||||||
|
// @ts-ignore TODO fix this
|
||||||
ref={scrollElRef}
|
ref={scrollElRef}
|
||||||
scrollEventThrottle={1}
|
scrollEventThrottle={1}
|
||||||
contentContainerStyle={{
|
contentContainerStyle={{
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ import {BskyAgent, AtpPersistSessionHandler} from '@atproto/api'
|
|||||||
import {useQueryClient} from '@tanstack/react-query'
|
import {useQueryClient} from '@tanstack/react-query'
|
||||||
import {jwtDecode} from 'jwt-decode'
|
import {jwtDecode} from 'jwt-decode'
|
||||||
|
|
||||||
|
import {IS_DEV} from '#/env'
|
||||||
|
import {isWeb} from '#/platform/detection'
|
||||||
import {networkRetry} from '#/lib/async/retry'
|
import {networkRetry} from '#/lib/async/retry'
|
||||||
import {logger} from '#/logger'
|
import {logger} from '#/logger'
|
||||||
import * as persisted from '#/state/persisted'
|
import * as persisted from '#/state/persisted'
|
||||||
@@ -309,7 +311,8 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
|
|||||||
)
|
)
|
||||||
|
|
||||||
__globalAgent = agent
|
__globalAgent = agent
|
||||||
window.agent = agent
|
// @ts-ignore
|
||||||
|
if (IS_DEV && isWeb) window.agent = agent
|
||||||
queryClient.clear()
|
queryClient.clear()
|
||||||
upsertAccount(account)
|
upsertAccount(account)
|
||||||
|
|
||||||
@@ -349,7 +352,8 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
|
|||||||
{networkErrorCallback: clearCurrentAccount},
|
{networkErrorCallback: clearCurrentAccount},
|
||||||
),
|
),
|
||||||
})
|
})
|
||||||
window.agent = agent
|
// @ts-ignore
|
||||||
|
if (IS_DEV && isWeb) window.agent = agent
|
||||||
|
|
||||||
let canReusePrevSession = false
|
let canReusePrevSession = false
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ function ProfileCardPillModerationCause({
|
|||||||
severity: 'alert' | 'inform'
|
severity: 'alert' | 'inform'
|
||||||
}) {
|
}) {
|
||||||
const pal = usePalette('default')
|
const pal = usePalette('default')
|
||||||
const {name} = useModerationCauseDescription(cause, 'account')
|
const {name} = useModerationCauseDescription(cause)
|
||||||
return (
|
return (
|
||||||
<View
|
<View
|
||||||
style={[s.mt5, pal.btn, styles.pill]}
|
style={[s.mt5, pal.btn, styles.pill]}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ import {
|
|||||||
ChevronTop_Stroke2_Corner0_Rounded as ChevronTop,
|
ChevronTop_Stroke2_Corner0_Rounded as ChevronTop,
|
||||||
} from '#/components/icons/Chevron'
|
} from '#/components/icons/Chevron'
|
||||||
import {ScreenHider} from '../../components/moderation/ScreenHider'
|
import {ScreenHider} from '../../components/moderation/ScreenHider'
|
||||||
import {ProfileHeader} from '#/screens/Profile/Header'
|
import {ProfileHeaderStandard} from '#/screens/Profile/Header/ProfileHeaderStandard'
|
||||||
import {ProfileCard} from '../com/profile/ProfileCard'
|
import {ProfileCard} from '../com/profile/ProfileCard'
|
||||||
import {FeedItem} from '../com/posts/FeedItem'
|
import {FeedItem} from '../com/posts/FeedItem'
|
||||||
import {FeedItem as NotifFeedItem} from '../com/notifications/FeedItem'
|
import {FeedItem as NotifFeedItem} from '../com/notifications/FeedItem'
|
||||||
@@ -243,7 +243,7 @@ export const DebugModScreen = ({}: NativeStackScreenProps<
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
labelDefs: {
|
labelDefs: {
|
||||||
'did:plc:fake-labeler': [interpretLabelValueDefinition(customLabelDef)],
|
'did:plc:fake-labeler': [interpretLabelValueDefinition(customLabelDef, 'did:plc:fake-labeler')],
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}, [label, visibility, noAdult, isLoggedOut, isTargetMe, did, customLabelDef])
|
}, [label, visibility, noAdult, isLoggedOut, isTargetMe, did, customLabelDef])
|
||||||
@@ -880,7 +880,7 @@ function MockAccountScreen({
|
|||||||
style={{}}
|
style={{}}
|
||||||
screenDescription="profile"
|
screenDescription="profile"
|
||||||
modui={moderation.ui('profileView')}>
|
modui={moderation.ui('profileView')}>
|
||||||
<ProfileHeader
|
<ProfileHeaderStandard
|
||||||
// @ts-ignore ProfileViewBasic is close enough -prf
|
// @ts-ignore ProfileViewBasic is close enough -prf
|
||||||
profile={profile}
|
profile={profile}
|
||||||
moderationOpts={moderationOpts}
|
moderationOpts={moderationOpts}
|
||||||
|
|||||||
@@ -62,7 +62,6 @@ export function Forms() {
|
|||||||
value={value}
|
value={value}
|
||||||
onChangeText={setValue}
|
onChangeText={setValue}
|
||||||
label="Text field"
|
label="Text field"
|
||||||
disabled
|
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user