Skip to content

Commit

Permalink
chore: add plotly/jodit as deps again
Browse files Browse the repository at this point in the history
  • Loading branch information
ribeirojose committed Jun 19, 2024
1 parent 6e6e198 commit 1d60475
Show file tree
Hide file tree
Showing 3 changed files with 2,018 additions and 61 deletions.
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
"@testing-library/react": "^16.0.0",
"@types/lodash": "^4.17.5",
"@types/node": "20.14.2",
"@types/plotly.js": "^2",
"@types/quill": "^2",
"@types/react": "18.3.3",
"@types/react-beautiful-dnd": "^13",
Expand Down Expand Up @@ -165,12 +166,9 @@
"yalc": "1.0.0-pre.53"
},
"peerDependencies": {
"jodit": "^4.2.27",
"jodit-react": "^4.1.2",
"react": ">=18",
"react-dom": ">=18",
"react-hook-form": "^7.50.1",
"react-plotly.js": "^2.6.0",
"react-router-dom": "^6.21.0"
},
"resolutions": {
Expand Down Expand Up @@ -219,11 +217,15 @@
"date-fns": "^3.6.0",
"embla-carousel-react": "^8.1.5",
"i18next": "^23.11.5",
"jodit": "^4.2.27",
"jodit-react": "^4.1.2",
"object-to-formdata": "^4.5.1",
"plotly.js": "^2.33.0",
"react-beautiful-dnd": "^13.1.1",
"react-colorful": "^5.6.1",
"react-day-picker": "^8.10.1",
"react-i18next": "^14.1.2",
"react-plotly.js": "^2.6.0",
"react-router": "^6.23.1",
"react-router-dom": "^6.23.1",
"swr": "^2.2.5",
Expand Down
10 changes: 6 additions & 4 deletions src/components/RichTextEditor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ import React, { Suspense, lazy } from "react";
import { Trans, useTranslation } from "react-i18next";
import { useTheme } from "#/components/ThemeToggle/context";

const JoditEditor = lazy(async () => {
const JoditEditor = lazy(() =>
// @ts-ignore
const obj = await import("jodit-react");
return typeof obj.default === "function" ? obj : obj.default;
});
import("jodit-react").then((obj) =>
typeof obj.default === "function" ? obj : obj.default
)
);

const EDITOR_BUTTONS = [
"undo",
"redo",
Expand Down
Loading

0 comments on commit 1d60475

Please sign in to comment.