Fixed ESLINT error

This commit is contained in:
DrMint 2022-02-17 23:36:24 +01:00
parent 403106c48a
commit bab17d47e0
4 changed files with 10 additions and 3 deletions

View File

@ -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 } } }
) { ) {

View File

@ -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;

View File

@ -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"

View File

@ -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;