mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-26 14:28:04 +00:00
Added lazy load, visualizer and optimized bundle chunks (#635)
* Added lazy load. * Added visualizer and improved hljs import only yaml * Optimized manualChunks
This commit is contained in:
@@ -1,17 +1,20 @@
|
||||
import { Diff2HtmlUI } from "diff2html/lib/ui/js/diff2html-ui-base";
|
||||
import hljs from "highlight.js";
|
||||
import hljs from "highlight.js/lib/core";
|
||||
import yaml from "highlight.js/lib/languages/yaml";
|
||||
|
||||
import { useEffect, useRef } from "react";
|
||||
import Spinner from "../../Spinner";
|
||||
import { diffConfiguration } from "../../../utils";
|
||||
|
||||
hljs.registerLanguage("yaml", yaml);
|
||||
|
||||
interface ManifestDiffProps {
|
||||
diff?: string;
|
||||
isLoading: boolean;
|
||||
error: string;
|
||||
}
|
||||
|
||||
export const ManifestDiff = ({ diff, isLoading, error }: ManifestDiffProps) => {
|
||||
const ManifestDiff = ({ diff, isLoading, error }: ManifestDiffProps) => {
|
||||
const diffContainerRef = useRef<HTMLDivElement | null>(null);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -63,3 +66,5 @@ export const ManifestDiff = ({ diff, isLoading, error }: ManifestDiffProps) => {
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default ManifestDiff;
|
||||
|
||||
Reference in New Issue
Block a user