From 33e6efdd8f3b04560d159cddbf223576b3599e22 Mon Sep 17 00:00:00 2001 From: wienans Date: Tue, 7 Apr 2026 21:26:13 +0200 Subject: [PATCH 1/2] Fix Markdown --- .../MarkdownRenderer/MarkdownRenderer.tsx | 40 ++++++++++++++++++- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/client/src/components/MarkdownRenderer/MarkdownRenderer.tsx b/client/src/components/MarkdownRenderer/MarkdownRenderer.tsx index da793872..ca939890 100644 --- a/client/src/components/MarkdownRenderer/MarkdownRenderer.tsx +++ b/client/src/components/MarkdownRenderer/MarkdownRenderer.tsx @@ -1,4 +1,7 @@ -import Markdown from "react-markdown"; +import { Box } from "@mui/material"; +import { useTheme } from "@mui/material/styles"; +import MDEditor from "@uiw/react-md-editor"; +import "@uiw/react-markdown-preview/markdown.css"; import remarkGfm from "remark-gfm"; interface MarkdownRendererProps { @@ -6,7 +9,40 @@ interface MarkdownRendererProps { } const MarkdownRenderer = ({ children }: MarkdownRendererProps) => { - return {children}; + const theme = useTheme(); + + return ( + :first-of-type": { + mt: 0, + }, + "& .wmde-markdown > :last-child": { + mb: 0, + }, + "& .wmde-markdown pre": { + overflowX: "auto", + }, + "& .wmde-markdown table": { + display: "block", + maxWidth: "100%", + overflowX: "auto", + }, + }} + > + + + ); }; export default MarkdownRenderer; From 936459e3005ab10e99dfc472f5633823ba352fef Mon Sep 17 00:00:00 2001 From: wienans Date: Tue, 7 Apr 2026 21:40:57 +0200 Subject: [PATCH 2/2] Fix Translation error --- .../ExerciseParts/ExerciseSearchDialog.tsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/client/src/components/ExerciseParts/ExerciseSearchDialog.tsx b/client/src/components/ExerciseParts/ExerciseSearchDialog.tsx index 3126841c..33bb2587 100644 --- a/client/src/components/ExerciseParts/ExerciseSearchDialog.tsx +++ b/client/src/components/ExerciseParts/ExerciseSearchDialog.tsx @@ -108,10 +108,12 @@ const ExerciseSearchDialog: React.FC = ({ .map((exercise) => { const blockIds = selectedBlocks[exercise._id] || []; const blockDurations: Record = {}; - + // Create mapping of blockId to duration - blockIds.forEach(blockId => { - const block = exercise.description_blocks.find(b => b._id === blockId); + blockIds.forEach((blockId) => { + const block = exercise.description_blocks.find( + (b) => b._id === blockId, + ); if (block) { blockDurations[blockId] = block.time_min; } @@ -244,8 +246,10 @@ const ExerciseSearchDialog: React.FC = ({ > - {t("block", { defaultValue: "Block" })}{" "} - {index + 1} + {t("block.title", { + blockNumber: index + 1, + defaultValue: "Block {{blockNumber}}", + })}