fix(mobile): replace component viewer usage with interface
This commit is contained in:
@@ -3,7 +3,7 @@ import { useFocusEffect, useNavigation } from '@react-navigation/native'
|
||||
import { ApplicationContext } from '@Root/ApplicationContext'
|
||||
import { AppStackNavigationProp } from '@Root/AppStack'
|
||||
import { SCREEN_NOTES } from '@Root/Screens/screens'
|
||||
import { ButtonType, ComponentViewer, PrefKey } from '@standardnotes/snjs'
|
||||
import { ButtonType, ComponentViewerInterface, PrefKey } from '@standardnotes/snjs'
|
||||
import { ThemeServiceContext } from '@Style/ThemeService'
|
||||
import React, { useCallback, useContext, useEffect, useRef, useState } from 'react'
|
||||
import { Platform } from 'react-native'
|
||||
@@ -25,7 +25,7 @@ import {
|
||||
} from './ComponentView.styled'
|
||||
|
||||
type Props = {
|
||||
componentViewer: ComponentViewer
|
||||
componentViewer: ComponentViewerInterface
|
||||
onLoadEnd: () => void
|
||||
onLoadStart: () => void
|
||||
onLoadError: (error: ComponentLoadingError, desc?: string) => void
|
||||
|
||||
@@ -7,7 +7,7 @@ import SNTextView from '@standardnotes/react-native-textview'
|
||||
import {
|
||||
ApplicationEvent,
|
||||
ComponentMutator,
|
||||
ComponentViewer,
|
||||
ComponentViewerInterface,
|
||||
ContentType,
|
||||
isPayloadSourceInternalChange,
|
||||
isPayloadSourceRetrieved,
|
||||
@@ -51,7 +51,7 @@ type State = {
|
||||
webViewErrorDesc?: string
|
||||
loadingWebview: boolean
|
||||
downloadingEditor: boolean
|
||||
componentViewer?: ComponentViewer
|
||||
componentViewer?: ComponentViewerInterface
|
||||
}
|
||||
|
||||
type PropsWhenNavigating = AppStackNavigationProp<typeof SCREEN_COMPOSE>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
"build": "yarn clean && yarn copy:components && webpack --config web.webpack.prod.js && yarn tsc",
|
||||
"clean": "rm -fr dist && rm -rf src/components",
|
||||
"format": "prettier --write src/javascripts",
|
||||
"lint": "NODE_OPTIONS=\"--max-old-space-size=4096\" eslint --debug src/javascripts",
|
||||
"lint": "NODE_OPTIONS=\"--max-old-space-size=4096\" eslint src/javascripts",
|
||||
"start": "webpack-dev-server --config web.webpack.dev.js",
|
||||
"test": "jest --config jest.config.js --coverage",
|
||||
"tsc": "tsc --project tsconfig.json",
|
||||
|
||||
Reference in New Issue
Block a user