diff --git a/compiler/forget/packages/playground/components/Editor/Output.tsx b/compiler/forget/packages/playground/components/Editor/Output.tsx
index ac52b9ebb7..94b252927b 100644
--- a/compiler/forget/packages/playground/components/Editor/Output.tsx
+++ b/compiler/forget/packages/playground/components/Editor/Output.tsx
@@ -7,7 +7,7 @@
import generate from "@babel/generator";
import * as t from "@babel/types";
-import MonacoEditor from "@monaco-editor/react";
+import MonacoEditor, { DiffEditor } from "@monaco-editor/react";
import { type CompilerError } from "babel-plugin-react-forget";
import prettier from "prettier";
import prettierParserBabel from "prettier/parser-babel";
@@ -15,6 +15,12 @@ import { memo, useMemo, useState } from "react";
import { type Store } from "../../lib/stores";
import TabbedWindow from "../TabbedWindow";
import { monacoOptions } from "./monacoOptions";
+import {
+ CodeIcon,
+ DocumentAddIcon,
+ InformationCircleIcon,
+} from "@heroicons/react/outline";
+
const MemoizedOutput = memo(Output);
export default MemoizedOutput;
@@ -86,8 +92,17 @@ function tabify(source: string, compilerOutput: CompilerOutput) {
}
}
}
+ let lastPassOutput: string | null = null;
for (const [passName, text] of concattedResults) {
- tabs.set(passName,
{compilerOutput.error.toString()}
@@ -180,24 +205,78 @@ function Output({ store, compilerOutput }: Props) {
);
}
-function TextTabContent({ output }: { output: string }) {
+function TextTabContent({
+ output,
+ diff,
+ showInfoPanel,
+}: {
+ output: string;
+ diff: string | null;
+ showInfoPanel: boolean;
+}) {
+ const [value, setValue] = useState(output);
return (
// Restrict MonacoEditor's height, since the config autoLayout:true
// will grow the editor to fit within parent element