mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-26 06:18:04 +00:00
Bump a lot of packages (#625)
* Bump react, luxon, swagger, uuid * Improved imports * Fixed vulnerabilities * Bump highlight.js and added eslint-plugin-react-hooks with fixes * Bump compare-versions, html-react-parser, react-intersection-observer, react-modern-drawer * Bump @tanstack/react-query, react-select * Added tsc:check script
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import { useMemo, useState } from "react";
|
||||
import { useParams } from "react-router-dom";
|
||||
import hljs from "highlight.js";
|
||||
import { RiExternalLinkLine } from "react-icons/ri";
|
||||
@@ -162,14 +162,11 @@ const DescribeResource = ({
|
||||
namespace,
|
||||
chart
|
||||
);
|
||||
const [yamlFormattedData, setYamlFormattedData] = useState("");
|
||||
|
||||
useEffect(() => {
|
||||
if (data) {
|
||||
const val = hljs.highlight(data, { language: "yaml" }).value;
|
||||
setYamlFormattedData(val);
|
||||
}
|
||||
}, [data]);
|
||||
const yamlFormattedData = useMemo(
|
||||
() => hljs.highlight(data ?? "", { language: "yaml" })?.value,
|
||||
[data]
|
||||
);
|
||||
|
||||
const badgeType = getBadgeType(status);
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user