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 { ApplicationContext } from '@Root/ApplicationContext'
|
||||||
import { AppStackNavigationProp } from '@Root/AppStack'
|
import { AppStackNavigationProp } from '@Root/AppStack'
|
||||||
import { SCREEN_NOTES } from '@Root/Screens/screens'
|
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 { ThemeServiceContext } from '@Style/ThemeService'
|
||||||
import React, { useCallback, useContext, useEffect, useRef, useState } from 'react'
|
import React, { useCallback, useContext, useEffect, useRef, useState } from 'react'
|
||||||
import { Platform } from 'react-native'
|
import { Platform } from 'react-native'
|
||||||
@@ -25,7 +25,7 @@ import {
|
|||||||
} from './ComponentView.styled'
|
} from './ComponentView.styled'
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
componentViewer: ComponentViewer
|
componentViewer: ComponentViewerInterface
|
||||||
onLoadEnd: () => void
|
onLoadEnd: () => void
|
||||||
onLoadStart: () => void
|
onLoadStart: () => void
|
||||||
onLoadError: (error: ComponentLoadingError, desc?: string) => void
|
onLoadError: (error: ComponentLoadingError, desc?: string) => void
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import SNTextView from '@standardnotes/react-native-textview'
|
|||||||
import {
|
import {
|
||||||
ApplicationEvent,
|
ApplicationEvent,
|
||||||
ComponentMutator,
|
ComponentMutator,
|
||||||
ComponentViewer,
|
ComponentViewerInterface,
|
||||||
ContentType,
|
ContentType,
|
||||||
isPayloadSourceInternalChange,
|
isPayloadSourceInternalChange,
|
||||||
isPayloadSourceRetrieved,
|
isPayloadSourceRetrieved,
|
||||||
@@ -51,7 +51,7 @@ type State = {
|
|||||||
webViewErrorDesc?: string
|
webViewErrorDesc?: string
|
||||||
loadingWebview: boolean
|
loadingWebview: boolean
|
||||||
downloadingEditor: boolean
|
downloadingEditor: boolean
|
||||||
componentViewer?: ComponentViewer
|
componentViewer?: ComponentViewerInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
type PropsWhenNavigating = AppStackNavigationProp<typeof SCREEN_COMPOSE>
|
type PropsWhenNavigating = AppStackNavigationProp<typeof SCREEN_COMPOSE>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
"build": "yarn clean && yarn copy:components && webpack --config web.webpack.prod.js && yarn tsc",
|
"build": "yarn clean && yarn copy:components && webpack --config web.webpack.prod.js && yarn tsc",
|
||||||
"clean": "rm -fr dist && rm -rf src/components",
|
"clean": "rm -fr dist && rm -rf src/components",
|
||||||
"format": "prettier --write src/javascripts",
|
"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",
|
"start": "webpack-dev-server --config web.webpack.dev.js",
|
||||||
"test": "jest --config jest.config.js --coverage",
|
"test": "jest --config jest.config.js --coverage",
|
||||||
"tsc": "tsc --project tsconfig.json",
|
"tsc": "tsc --project tsconfig.json",
|
||||||
|
|||||||
Reference in New Issue
Block a user