diff --git a/src/lenses/SafeHtmlLens.tsx b/src/lenses/SafeHtmlLens.tsx
index 200d86a8..abdc0077 100644
--- a/src/lenses/SafeHtmlLens.tsx
+++ b/src/lenses/SafeHtmlLens.tsx
@@ -3,8 +3,8 @@ import { Lens } from '../types';
import DOMPurify from 'dompurify';
import Html from '../components/ui/Html';
-const SafeHtmlLens: Lens = ({ value }) => {
- const safe_html = DOMPurify.sanitize(value as string);
+const SafeHtmlLens: Lens = ({ value }) => {
+ const safe_html = DOMPurify.sanitize(value);
return ;
};
diff --git a/src/lenses/TextLens.tsx b/src/lenses/TextLens.tsx
index 03d800fc..55578887 100644
--- a/src/lenses/TextLens.tsx
+++ b/src/lenses/TextLens.tsx
@@ -1,12 +1,10 @@
import 'twin.macro';
import { Lens } from '../types';
-const TextLens: Lens = ({ value }) => {
- const text = value as string;
-
+const TextLens: Lens = ({ value }) => {
return (
- {text}
+ {value}
);
};
diff --git a/src/stores/components.ts b/src/stores/components.ts
index 7bf801ce..d8207674 100644
--- a/src/stores/components.ts
+++ b/src/stores/components.ts
@@ -6,8 +6,8 @@ import { DataType } from '../datatypes';
import { ALL_LENSES } from '../lenses';
import { ALL_WIDGETS } from '../widgets';
-export function isLensCompatible(
- view: Lens,
+export function isLensCompatible(
+ view: Lens,
types: DataType[],
canEdit: boolean
): boolean {
@@ -65,7 +65,8 @@ export function registerWidget(widget: Widget) {
}
ALL_WIDGETS.forEach(registerWidget);
-export function registerLens(lens: Lens) {
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+export function registerLens(lens: Lens) {
useComponentsStore.setState((state) => {
const lensesByKey = { ...state.lensesByKey, [lens.key]: lens };
return {