generated from nhcarrigan/template
feat: render changelog as markdown in about panel (#33)
## Summary - Installs `react-markdown@10.1.0` in `apps/web` - Replaces the `<pre>` tag in the changelog section with the `<Markdown>` component for proper rendering - Updates CSS to style markdown elements (paragraphs, lists, headings, code blocks, links, bold text) Closes #31 ✨ This PR was created with help from Hikari~ 🌸 Reviewed-on: #33 Co-authored-by: Hikari <hikari@nhcarrigan.com> Co-committed-by: Hikari <hikari@nhcarrigan.com>
This commit was merged in pull request #33.
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
/* eslint-disable max-lines-per-function -- HOW_TO_PLAY data and render logic */
|
||||
/* eslint-disable max-lines -- HOW_TO_PLAY data makes this file long */
|
||||
import { type JSX, useEffect, useState } from "react";
|
||||
import Markdown from "react-markdown";
|
||||
import { getAbout } from "../../api/client.js";
|
||||
import type { AboutResponse } from "@elysium/types";
|
||||
|
||||
@@ -331,7 +332,9 @@ const aboutPanel = (): JSX.Element => {
|
||||
</span>
|
||||
</button>
|
||||
{expandedRelease === release.tag_name
|
||||
&& <pre className="about-release-body">{release.body}</pre>
|
||||
&& <div className="about-release-body">
|
||||
<Markdown>{release.body}</Markdown>
|
||||
</div>
|
||||
}
|
||||
</li>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user