Skip to content

Commit 87aa58e

Browse files
committed
fix: build issue
1 parent ba43d6b commit 87aa58e

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

admin/src/components/MediaLib.tsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
import React from 'react';
2-
import prefixFileUrlWithBackendUrl from '../utils/prefixFileUrlWithBackendUrl';
3-
import { useStrapiApp } from '@strapi/strapi/admin';
4-
import type { Schema } from '@strapi/types';
1+
import React from "react";
2+
import prefixFileUrlWithBackendUrl from "../utils/prefixFileUrlWithBackendUrl";
3+
import { useStrapiApp } from "@strapi/strapi/admin";
4+
import type { Schema } from "@strapi/types";
55

66
const MediaLibComponent: React.FC<any> = ({
77
isOpen = false,
88
onChange,
99
onToggle,
10-
allowedTypes
10+
allowedTypes,
1111
}) => {
12-
13-
const components = useStrapiApp('ImageDialog', (state) => state.components);
12+
const components = useStrapiApp("ImageDialog", (state) => state.components);
1413
if (!components || !isOpen) return null;
1514

16-
const MediaLibraryDialog = components['media-library'] as React.ComponentType<{
15+
const MediaLibraryDialog: any = components[
16+
"media-library"
17+
] as React.ComponentType<{
1718
allowedTypes?: Schema.Attribute.MediaKind[]; // 'images' | 'videos' | 'files' | 'audios'
1819
onClose: () => void;
1920
onSelectAssets: (_images: Schema.Attribute.MediaValue<true>) => void;
2021
}>;
2122

22-
2323
const handleSelectAssets = (assets: Schema.Attribute.MediaValue<true>) => {
2424
const formattedFiles = assets.map((f) => ({
2525
alt: f.alternativeText || f.name,
@@ -39,9 +39,9 @@ const MediaLibComponent: React.FC<any> = ({
3939

4040
return (
4141
<MediaLibraryDialog
42-
allowedTypes={allowedTypes}
43-
onClose={onToggle}
44-
onSelectAssets={handleSelectAssets}
42+
allowedTypes={allowedTypes}
43+
onClose={onToggle}
44+
onSelectAssets={handleSelectAssets}
4545
/>
4646
);
4747
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "strapi-plugin-wysiwyg-react-md-editor",
3-
"version": "5.0.2",
3+
"version": "5.8.0",
44
"description": "Replaces the default Strapi WYSIWYG editor with react md editor.",
55
"keywords": [
66
"strapi",

0 commit comments

Comments
 (0)