Mercurial
comparison hg-web/src/repo-browser.tsx @ 188:32ce881452fa hg-web
Fixing few stuff.
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Fri, 23 Jan 2026 22:50:28 -0800 |
| parents | fed99fc04e12 |
| children | a2725419f988 |
comparison
equal
deleted
inserted
replaced
| 187:a69485d9f2e1 | 188:32ce881452fa |
|---|---|
| 1 import React, { useState, useEffect } from 'react'; | 1 import React, { useState, useEffect } from 'react'; |
| 2 import { renderMarkdown } from './src/markdown_to_html.js'; | 2 import renderMarkdown from './markdown_to_html_bin.js'; |
| 3 | |
| 4 console.log(renderMarkdown); | |
| 3 | 5 |
| 4 // --- ICONS (Using CDN Links) --- | 6 // --- ICONS (Using CDN Links) --- |
| 5 const ICONS = { | 7 const ICONS = { |
| 6 folder: "https://cdn-icons-png.flaticon.com/512/11471/11471391.png", | 8 folder: "https://cdn-icons-png.flaticon.com/512/11471/11471391.png", |
| 7 file: "https://raw.githubusercontent.com/PKief/vscode-material-icon-theme/main/icons/document.svg", | 9 file: "https://raw.githubusercontent.com/PKief/vscode-material-icon-theme/main/icons/document.svg", |
| 272 * Component: ReadmeViewer | 274 * Component: ReadmeViewer |
| 273 */ | 275 */ |
| 274 function ReadmeViewer({ content }) { | 276 function ReadmeViewer({ content }) { |
| 275 if (!content) return null; | 277 if (!content) return null; |
| 276 | 278 |
| 277 useEffect(() => renderMarkdown(content, readmeContent), [content]); | |
| 278 | |
| 279 return ( | 279 return ( |
| 280 <div id="readmeSection"> | 280 <div id="readmeSection"> |
| 281 <div className="readme-header"> | 281 <div className="readme-header"> |
| 282 <img src="https://img.icons8.com/material-outlined/24/000000/menu--v1.png" width="16" alt="" style={{opacity:0.5}} /> | 282 <img src="https://img.icons8.com/material-outlined/24/000000/menu--v1.png" width="16" alt="" style={{opacity:0.5}} /> |
| 283 README.md | 283 README.md |