Fix lint errors
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
import {createSinglePathSVG} from './TEMPLATE'
|
import {createSinglePathSVG} from './TEMPLATE'
|
||||||
|
|
||||||
export const DotGrid1x3Horizontal_Stroke2_Corner0_Rounded = createSinglePathSVG({
|
export const DotGrid1x3Horizontal_Stroke2_Corner0_Rounded = createSinglePathSVG(
|
||||||
|
{
|
||||||
path: 'M2 12a2 2 0 1 1 4 0 2 2 0 0 1-4 0Zm16 0a2 2 0 1 1 4 0 2 2 0 0 1-4 0Zm-6-2a2 2 0 1 0 0 4 2 2 0 0 0 0-4Z',
|
path: 'M2 12a2 2 0 1 1 4 0 2 2 0 0 1-4 0Zm16 0a2 2 0 1 1 4 0 2 2 0 0 1-4 0Zm-6-2a2 2 0 1 0 0 4 2 2 0 0 0 0-4Z',
|
||||||
})
|
},
|
||||||
|
)
|
||||||
|
|||||||
@@ -77,9 +77,8 @@ 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?.moderationPrefs.mods.length < 10
|
(preferences ? 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()
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import {useLingui} from '@lingui/react'
|
|||||||
import {useSafeAreaFrame} from 'react-native-safe-area-context'
|
import {useSafeAreaFrame} from 'react-native-safe-area-context'
|
||||||
|
|
||||||
import {useScrollHandlers} from '#/lib/ScrollContext'
|
import {useScrollHandlers} from '#/lib/ScrollContext'
|
||||||
import {runOnJS} from 'react-native-reanimated'
|
|
||||||
import {useAnimatedScrollHandler} from '#/lib/hooks/useAnimatedScrollHandler_FIXED'
|
import {useAnimatedScrollHandler} from '#/lib/hooks/useAnimatedScrollHandler_FIXED'
|
||||||
import {lookupLabelValueDefinition} from '#/lib/moderation'
|
import {lookupLabelValueDefinition} from '#/lib/moderation'
|
||||||
import {ListRef} from '#/view/com/util/List'
|
import {ListRef} from '#/view/com/util/List'
|
||||||
@@ -21,8 +20,6 @@ import {isNative} from '#/platform/detection'
|
|||||||
import {useTheme, atoms as a} from '#/alf'
|
import {useTheme, atoms as a} from '#/alf'
|
||||||
import {Text} from '#/components/Typography'
|
import {Text} from '#/components/Typography'
|
||||||
import {Loader} from '#/components/Loader'
|
import {Loader} from '#/components/Loader'
|
||||||
import {Divider} from '#/components/Divider'
|
|
||||||
import {Button, ButtonText} from '#/components/Button'
|
|
||||||
import {CenteredView, ScrollView} from '#/view/com/util/Views'
|
import {CenteredView, ScrollView} from '#/view/com/util/Views'
|
||||||
import {ErrorState} from '../ErrorState'
|
import {ErrorState} from '../ErrorState'
|
||||||
import {ModerationLabelPref} from '#/components/moderation/ModerationLabelPref'
|
import {ModerationLabelPref} from '#/components/moderation/ModerationLabelPref'
|
||||||
@@ -113,7 +110,6 @@ export function ProfileLabelsSectionInner({
|
|||||||
scrollElRef: ListRef
|
scrollElRef: ListRef
|
||||||
headerHeight: number
|
headerHeight: number
|
||||||
}) {
|
}) {
|
||||||
const {_} = useLingui()
|
|
||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
const contextScrollHandlers = useScrollHandlers()
|
const contextScrollHandlers = useScrollHandlers()
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import {AppBskyActorDefs, AppBskyGraphDefs, ModerationUI} from '@atproto/api'
|
import {AppBskyActorDefs, AppBskyGraphDefs} from '@atproto/api'
|
||||||
import {StyleProp, ViewStyle} from 'react-native'
|
import {StyleProp, ViewStyle} from 'react-native'
|
||||||
import {Image as RNImage} from 'react-native-image-crop-picker'
|
import {Image as RNImage} from 'react-native-image-crop-picker'
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ import {countLines} from 'lib/strings/helpers'
|
|||||||
import {useComposerControls} from '#/state/shell/composer'
|
import {useComposerControls} from '#/state/shell/composer'
|
||||||
import {Shadow, usePostShadow, POST_TOMBSTONE} from '#/state/cache/post-shadow'
|
import {Shadow, usePostShadow, POST_TOMBSTONE} from '#/state/cache/post-shadow'
|
||||||
import {FeedNameText} from '../util/FeedInfoText'
|
import {FeedNameText} from '../util/FeedInfoText'
|
||||||
import {useSession} from '#/state/session'
|
|
||||||
import {Trans, msg} from '@lingui/macro'
|
import {Trans, msg} from '@lingui/macro'
|
||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
import {atoms as a} from '#/alf'
|
import {atoms as a} from '#/alf'
|
||||||
@@ -106,17 +105,10 @@ let FeedItemInner = ({
|
|||||||
const {openComposer} = useComposerControls()
|
const {openComposer} = useComposerControls()
|
||||||
const pal = usePalette('default')
|
const pal = usePalette('default')
|
||||||
const {_} = useLingui()
|
const {_} = useLingui()
|
||||||
const {currentAccount} = useSession()
|
|
||||||
const href = useMemo(() => {
|
const href = useMemo(() => {
|
||||||
const urip = new AtUri(post.uri)
|
const urip = new AtUri(post.uri)
|
||||||
return makeProfileLink(post.author, 'post', urip.rkey)
|
return makeProfileLink(post.author, 'post', urip.rkey)
|
||||||
}, [post.uri, post.author])
|
}, [post.uri, post.author])
|
||||||
const isModeratedPost = !!moderation.causes.find(
|
|
||||||
cause =>
|
|
||||||
cause?.type === 'label' &&
|
|
||||||
cause.label.src !== currentAccount?.did &&
|
|
||||||
cause.label.uri === post.uri,
|
|
||||||
)
|
|
||||||
|
|
||||||
const replyAuthorDid = useMemo(() => {
|
const replyAuthorDid = useMemo(() => {
|
||||||
if (!record?.reply) {
|
if (!record?.reply) {
|
||||||
|
|||||||
@@ -243,7 +243,9 @@ export const DebugModScreen = ({}: NativeStackScreenProps<
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
labelDefs: {
|
labelDefs: {
|
||||||
'did:plc:fake-labeler': [interpretLabelValueDefinition(customLabelDef, 'did:plc:fake-labeler')],
|
'did:plc:fake-labeler': [
|
||||||
|
interpretLabelValueDefinition(customLabelDef, 'did:plc:fake-labeler'),
|
||||||
|
],
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}, [label, visibility, noAdult, isLoggedOut, isTargetMe, did, customLabelDef])
|
}, [label, visibility, noAdult, isLoggedOut, isTargetMe, did, customLabelDef])
|
||||||
@@ -703,7 +705,6 @@ function SmallToggler({
|
|||||||
label,
|
label,
|
||||||
children,
|
children,
|
||||||
}: React.PropsWithChildren<{label: string}>) {
|
}: React.PropsWithChildren<{label: string}>) {
|
||||||
const t = useTheme()
|
|
||||||
const [show, setShow] = React.useState(false)
|
const [show, setShow] = React.useState(false)
|
||||||
return (
|
return (
|
||||||
<View>
|
<View>
|
||||||
|
|||||||
Reference in New Issue
Block a user