Use asPredicate
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import {AppBskyGraphDefs, AppBskyGraphStarterpack} from '@atproto/api'
|
import {
|
||||||
|
AppBskyGraphDefs,
|
||||||
|
AppBskyGraphStarterpack,
|
||||||
|
asPredicate,
|
||||||
|
} from '@atproto/api'
|
||||||
import {GeneratorView} from '@atproto/api/dist/client/types/app/bsky/feed/defs'
|
import {GeneratorView} from '@atproto/api/dist/client/types/app/bsky/feed/defs'
|
||||||
import {msg} from '@lingui/macro'
|
import {msg} from '@lingui/macro'
|
||||||
|
|
||||||
@@ -124,7 +128,7 @@ export function Provider({
|
|||||||
const createInitialState = (): State => {
|
const createInitialState = (): State => {
|
||||||
if (
|
if (
|
||||||
starterPack &&
|
starterPack &&
|
||||||
AppBskyGraphStarterpack.isValidRecord(starterPack.record)
|
asPredicate(AppBskyGraphStarterpack.validateRecord)(starterPack.record)
|
||||||
) {
|
) {
|
||||||
return {
|
return {
|
||||||
canNext: true,
|
canNext: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user