Skip to content

Commit

Permalink
change editor settings editor language to jsx
Browse files Browse the repository at this point in the history
  • Loading branch information
hatemhosny committed Feb 3, 2024
1 parent ce0fe2c commit 8eab3f8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/livecodes/UI/editor-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,11 @@ export const createEditorSettingsUI = async ({
baseUrl,
container: previewContainer,
editorId: 'editorSettings',
getLanguageExtension: () => 'tsx',
getLanguageExtension: () => 'jsx',
isEmbed: false,
isHeadless: false,
language: 'tsx',
mapLanguage: () => 'typescript',
language: 'jsx',
mapLanguage: () => 'javascript',
readonly: false,
value: editorContent,
...getEditorConfig(userConfig),
Expand Down Expand Up @@ -454,7 +454,7 @@ const editorContent = `
import React, { useState } from 'react';
import { createRoot } from "react-dom/client";
function App(props: { name: string }) {
function App(props) {
const [count, setCount] = useState(0);
// increment on click!
const onClick = () => setCount(count + 1);
Expand All @@ -472,6 +472,6 @@ function App(props: { name: string }) {
);
}
const root = createRoot(document.querySelector("#app"));
const root = createRoot(document.querySelector("#root"));
root.render(<App name="React" />);
`.trimStart();

0 comments on commit 8eab3f8

Please sign in to comment.