[compiler:playground] JS tab is expanded by default

When using the playground you typically want to see what it outputs, so
let's make the JS tab expanded by default.

ghstack-source-id: 721bc4c381
Pull Request resolved: https://github.com/facebook/react/pull/29203
This commit is contained in:
Lauren Tan
2024-05-21 18:12:30 -04:00
parent 9b3f909cc1
commit b759b71ead
2 changed files with 1 additions and 2 deletions
@@ -28,7 +28,6 @@ test("editor should compile successfully", async ({ page }) => {
});
// User input from hash compiles
await page.getByRole("button", { name: /JS/ }).click();
await page.screenshot({
fullPage: true,
path: "test-results/01-show-js-before.png",
@@ -177,7 +177,7 @@ function getSourceMapUrl(code: string, map: string): string | null {
}
function Output({ store, compilerOutput }: Props) {
const [tabsOpen, setTabsOpen] = useState<Set<string>>(() => new Set());
const [tabsOpen, setTabsOpen] = useState<Set<string>>(() => new Set(['JS']));
const [tabs, setTabs] = useState<Map<string, React.ReactNode>>(
() => new Map(),
);