From d255e57833a9105c8d448dc396d09dba34de520a Mon Sep 17 00:00:00 2001 From: Botho <1258870+elbotho@users.noreply.github.com> Date: Thu, 9 Jan 2025 17:23:22 +0100 Subject: [PATCH] refactor(web): import StaticMath from package --- apps/web/src/components/comments/comment.tsx | 6 ++---- apps/web/src/components/equations-app/overview.tsx | 6 ++---- apps/web/src/components/user/event.tsx | 6 ++---- apps/web/src/serlo-editor-integration/create-renderers.tsx | 7 +++---- 4 files changed, 9 insertions(+), 16 deletions(-) diff --git a/apps/web/src/components/comments/comment.tsx b/apps/web/src/components/comments/comment.tsx index aef891eb0f..cc764ce34e 100644 --- a/apps/web/src/components/comments/comment.tsx +++ b/apps/web/src/components/comments/comment.tsx @@ -1,4 +1,4 @@ -import type { StaticMathProps } from '@editor/plugins/text/static-components/static-math' +import type { StaticMathProps } from '@editor/package' import dynamic from 'next/dynamic' import { useEffect, useRef, useState } from 'react' @@ -23,9 +23,7 @@ interface CommentProps { } const StaticMath = dynamic(() => - import('@editor/plugins/text/static-components/static-math').then( - (mod) => mod.StaticMath - ) + import('@editor/package').then((mod) => mod.StaticMath) ) export function Comment({ diff --git a/apps/web/src/components/equations-app/overview.tsx b/apps/web/src/components/equations-app/overview.tsx index abd5ce0a37..c61e278f50 100644 --- a/apps/web/src/components/equations-app/overview.tsx +++ b/apps/web/src/components/equations-app/overview.tsx @@ -1,4 +1,4 @@ -import type { StaticMathProps } from '@editor/plugins/text/static-components/static-math' +import type { StaticMathProps } from '@editor/package' import { faCheck, faPlay } from '@fortawesome/free-solid-svg-icons' import dynamic from 'next/dynamic' @@ -12,9 +12,7 @@ interface OverviewProps { } const StaticMath = dynamic(() => - import('@editor/plugins/text/static-components/static-math').then( - (mod) => mod.StaticMath - ) + import('@editor/package').then((mod) => mod.StaticMath) ) export function Overview({ selectLevel, solved }: OverviewProps) { diff --git a/apps/web/src/components/user/event.tsx b/apps/web/src/components/user/event.tsx index b313ad8d1a..d63067bb66 100644 --- a/apps/web/src/components/user/event.tsx +++ b/apps/web/src/components/user/event.tsx @@ -1,4 +1,4 @@ -import type { StaticMathProps } from '@editor/plugins/text/static-components/static-math' +import type { StaticMathProps } from '@editor/package' import { faBellSlash, faCheck } from '@fortawesome/free-solid-svg-icons' import { Entity } from '@serlo/authorization' import Tippy from '@tippyjs/react' @@ -39,9 +39,7 @@ interface EventProps { } const StaticMath = dynamic(() => - import('@editor/plugins/text/static-components/static-math').then( - (mod) => mod.StaticMath - ) + import('@editor/package').then((mod) => mod.StaticMath) ) export function Event({ diff --git a/apps/web/src/serlo-editor-integration/create-renderers.tsx b/apps/web/src/serlo-editor-integration/create-renderers.tsx index f15ce2c29c..bb174e5d7a 100644 --- a/apps/web/src/serlo-editor-integration/create-renderers.tsx +++ b/apps/web/src/serlo-editor-integration/create-renderers.tsx @@ -1,3 +1,4 @@ +import type { StaticMathProps } from '@editor/package' import { InitRenderersArgs, LinkRenderer, @@ -117,10 +118,8 @@ const HighlightStaticRenderer = dynamic(() => (mod) => mod.HighlightStaticRenderer ) ) -const StaticMath = dynamic(() => - import('@editor/plugins/text/static-components/static-math').then( - (mod) => mod.StaticMath - ) +const StaticMath = dynamic(() => + import('@editor/package').then((mod) => mod.StaticMath) ) export function createRenderers(): InitRenderersArgs {