Remove deprecated models and mobx usage (react-query refactor) (#1934)
* Update login page to use service query * Update modal to use session instead of store * Move image sizes cache off store * Update settings to no longer use store * Update link-meta fetch to use agent instead of rootstore * Remove deprecated resolveName() * Delete deprecated link-metas cache * Delete deprecated posts cache * Delete all remaining mobx models, including the root store * Strip out unused mobx observer wrappers
This commit is contained in:
parent
e637798e05
commit
54faa7e176
81 changed files with 1084 additions and 1941 deletions
|
@ -2,7 +2,6 @@ import React, {useState, useMemo} from 'react'
|
|||
import {Linking, StyleSheet, TouchableOpacity, View} from 'react-native'
|
||||
import {ScrollView} from 'react-native-gesture-handler'
|
||||
import {AtUri} from '@atproto/api'
|
||||
import {useStores} from 'state/index'
|
||||
import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries'
|
||||
import {s} from 'lib/styles'
|
||||
import {Text} from '../../util/text/Text'
|
||||
|
@ -17,6 +16,7 @@ import {CollectionId} from './types'
|
|||
import {Trans, msg} from '@lingui/macro'
|
||||
import {useLingui} from '@lingui/react'
|
||||
import {useModalControls} from '#/state/modals'
|
||||
import {useSession} from '#/state/session'
|
||||
|
||||
const DMCA_LINK = 'https://blueskyweb.xyz/support/copyright'
|
||||
|
||||
|
@ -39,7 +39,7 @@ type ReportComponentProps =
|
|||
}
|
||||
|
||||
export function Component(content: ReportComponentProps) {
|
||||
const store = useStores()
|
||||
const {agent} = useSession()
|
||||
const {closeModal} = useModalControls()
|
||||
const pal = usePalette('default')
|
||||
const {isMobile} = useWebMediaQueries()
|
||||
|
@ -70,7 +70,7 @@ export function Component(content: ReportComponentProps) {
|
|||
const $type = !isAccountReport
|
||||
? 'com.atproto.repo.strongRef'
|
||||
: 'com.atproto.admin.defs#repoRef'
|
||||
await store.agent.createModerationReport({
|
||||
await agent.createModerationReport({
|
||||
reasonType: issue,
|
||||
subject: {
|
||||
$type,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue