Fixed ESLINT error
This commit is contained in:
parent
403106c48a
commit
bab17d47e0
|
@ -335,6 +335,7 @@ query getLibraryItem($slug: String, $language_code: String) {
|
||||||
subtype {
|
subtype {
|
||||||
data {
|
data {
|
||||||
attributes {
|
attributes {
|
||||||
|
slug
|
||||||
titles(
|
titles(
|
||||||
filters: { language: { code: { eq: $language_code } } }
|
filters: { language: { code: { eq: $language_code } } }
|
||||||
) {
|
) {
|
||||||
|
|
|
@ -486,6 +486,7 @@ export type GetLibraryItemQuery = {
|
||||||
__typename: "VideoSubtypeEntity";
|
__typename: "VideoSubtypeEntity";
|
||||||
attributes: {
|
attributes: {
|
||||||
__typename: "VideoSubtype";
|
__typename: "VideoSubtype";
|
||||||
|
slug: string;
|
||||||
titles: Array<{
|
titles: Array<{
|
||||||
__typename: "ComponentTranslationsSimpleTitle";
|
__typename: "ComponentTranslationsSimpleTitle";
|
||||||
title: string;
|
title: string;
|
||||||
|
|
|
@ -65,8 +65,10 @@ export default function Editor(props: EditorProps): JSX.Element {
|
||||||
paste = paste.replace(/<\!--.*?-->/g, "");
|
paste = paste.replace(/<\!--.*?-->/g, "");
|
||||||
paste = turndownService.turndown(paste);
|
paste = turndownService.turndown(paste);
|
||||||
paste = paste.replace(/<\!--.*?-->/g, "");
|
paste = paste.replace(/<\!--.*?-->/g, "");
|
||||||
event.target.value = paste;
|
|
||||||
event.target.select();
|
const target = event.target as HTMLTextAreaElement;
|
||||||
|
target.value = paste;
|
||||||
|
target.select();
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}}
|
}}
|
||||||
className="bg-mid rounded-xl p-8 w-full font-monospace"
|
className="bg-mid rounded-xl p-8 w-full font-monospace"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import {
|
import {
|
||||||
|
GetLibraryItemQuery,
|
||||||
GetLibraryItemsPreviewQuery,
|
GetLibraryItemsPreviewQuery,
|
||||||
GetWebsiteInterfaceQuery,
|
GetWebsiteInterfaceQuery,
|
||||||
} from "graphql/operations-types";
|
} from "graphql/operations-types";
|
||||||
|
@ -49,7 +50,9 @@ export function prettyinlineTitle(
|
||||||
}
|
}
|
||||||
|
|
||||||
export function prettyItemType(
|
export function prettyItemType(
|
||||||
metadata: GetLibraryItemsPreviewQuery["libraryItems"]["data"][number]["attributes"]["metadata"][number],
|
metadata: {
|
||||||
|
__typename: GetLibraryItemsPreviewQuery["libraryItems"]["data"][number]["attributes"]["metadata"][number]["__typename"]
|
||||||
|
},
|
||||||
langui: GetWebsiteInterfaceQuery["websiteInterfaces"]["data"][number]["attributes"]
|
langui: GetWebsiteInterfaceQuery["websiteInterfaces"]["data"][number]["attributes"]
|
||||||
): string {
|
): string {
|
||||||
const type = metadata.__typename;
|
const type = metadata.__typename;
|
||||||
|
|
Loading…
Reference in New Issue