@samitouri / QOS-React-2 / commits / 76a4bd67f4

[playground] Remove unused kind parameter

Sathya Gunasekaran committed Nov 24, 2022 at 17:56 UTC 76a4bd67f44c217ef0c6eb84c50d0fd78f23f0ea
1 file changed +5 -26
compiler/forget/packages/playground/components/Editor/Output.tsx
+5 -26
@@ -7,7 +7,7 @@
7
8 import generate from "@babel/generator";
9 import MonacoEditor from "@monaco-editor/react";
10 -import { Diagnostic, HIR, OutputKind } from "babel-plugin-react-forget";
10 +import { Diagnostic, HIR } from "babel-plugin-react-forget";
11 import prettier from "prettier";
12 import prettierParserBabel from "prettier/parser-babel";
13 import { memo, useMemo } from "react";
@@ -126,47 +126,32 @@ function Output({ store }: Props) {
126 defaultTab="HIR"
127 tabs={{
128 HIR: (
129 - <TextTabContent
130 - output={compilerOutput.hirOutput}
131 - kind={OutputKind.IR}
132 - ></TextTabContent>
129 + <TextTabContent output={compilerOutput.hirOutput}></TextTabContent>
130 ),
131 SSA: (
135 - <TextTabContent
136 - output={compilerOutput.ssaOutput}
137 - kind={OutputKind.IR}
138 - ></TextTabContent>
132 + <TextTabContent output={compilerOutput.ssaOutput}></TextTabContent>
133 ),
134 EliminateRedundantPhi: (
135 <TextTabContent
136 output={compilerOutput.eliminateRedundantPhiOutput}
143 - kind={OutputKind.IR}
137 ></TextTabContent>
138 ),
139 InferReferenceEffects: (
140 <TextTabContent
141 output={compilerOutput.inferReferenceEffectsOutput}
149 - kind={OutputKind.IR}
142 ></TextTabContent>
143 ),
144 InferMutableRanges: (
145 <TextTabContent
146 output={compilerOutput.inferMutableRangesOutput}
155 - kind={OutputKind.IR}
147 ></TextTabContent>
148 ),
149 LeaveSSA: (
150 <TextTabContent
151 output={compilerOutput.leaveSSAOutput}
161 - kind={OutputKind.IR}
152 ></TextTabContent>
153 ),
164 - JS: (
165 - <TextTabContent
166 - output={compilerOutput.codegenOutput}
167 - kind={OutputKind.JS}
168 - />
169 - ),
154 + JS: <TextTabContent output={compilerOutput.codegenOutput} />,
155 SourceMap: (
156 <>
157 {compilerOutput.sourceMapUrl && (
@@ -195,13 +180,7 @@ function getSourceMapUrl(code: string, map: string): string | null {
180 )}`;
181 }
182
198 -function TextTabContent({
199 - output,
200 - kind,
201 -}: {
202 - output: string;
203 - kind: OutputKind;
204 -}) {
183 +function TextTabContent({ output }: { output: string }) {
184 return (
185 <div className="w-full h-full">
186 <MonacoEditor