perf(frontend): replace react-markdown with a small safe renderer (DownloadPage 120 KB -> 6 KB)

This commit is contained in:
loki5512344 2026-09-30 16:27:32 +02:00
parent d629ccf496
commit 167405aed0
Signed by: boba
GPG key ID: 253067914055423B
6 changed files with 129 additions and 166 deletions

View file

@ -1,11 +1,11 @@
import { useQuery } from '@tanstack/react-query'
import Markdown from 'react-markdown'
import { useTranslation } from 'react-i18next'
import { Markdown } from '@shared/ui/Markdown'
import { fetchReleases } from './api'
/**
* Changelog feed. Markdown bodies are rendered by react-markdown, which does not
* enable raw HTML — so a `<script>` or `onerror=` in a release body stays inert text.
* Changelog feed. Markdown bodies go through our own renderer, which builds React
* elements and never raw HTML, so a `<script>` or `onerror=` in a release body stays inert text.
*/
export function ReleaseNotes() {
const { t, i18n } = useTranslation('download')