fix eslint errors

This commit is contained in:
tmshv committed 2022-09-06 14:34:50 +03:00
1 parent a732ec0640
commit 86a02a945b
12 files changed
+89 -89

No files matched your search

+8 -8
View File
@@ -1,8 +1,8 @@
import { IMenu, IPage, ITag, PageCardDto, Pic, Token } from "@/types";
import { asItem } from "./lib";
import { StrapiComponentEmbed, StrapiComponent, StrapiHome, StrapiPage, StrapiPageCard, StrapiTag, StrapiMedia, StrapiMenu } from "./types";
import { IMenu, IPage, ITag, PageCardDto, Pic, Token } from "@/types"
import { asItem } from "./lib"
import { StrapiComponentEmbed, StrapiComponent, StrapiHome, StrapiPage, StrapiPageCard, StrapiTag, StrapiMedia, StrapiMenu } from "./types"
import { typograf, markdownToHtml } from 'src/lib/text'
import { encodeImageToBlurhash } from "./image";
import { encodeImageToBlurhash } from "./image"
const md = (text: string) => typograf(markdownToHtml(text))
@@ -22,13 +22,13 @@ export function createEmbed(component: StrapiComponentEmbed): Token {
token: 'youtube',
data: {
url: component.src,
}
},
}
}
return {
token: 'html',
data: `<iframe src="${component.src}" width="100%" height="480" frameborder="0"></iframe>`
data: `<iframe src="${component.src}" width="100%" height="480" frameborder="0"></iframe>`,
}
}
@@ -66,7 +66,7 @@ export async function createPageToken(component: StrapiComponent): Promise<Token
file_size: component.media.size * 1000,
// file_size: component.media.size,
file_format: component.media.mime,
}
},
}
}
@@ -83,7 +83,7 @@ export async function createPageToken(component: StrapiComponent): Promise<Token
token: 'grid',
data: {
items,
}
},
}
}