From 4c4d17037961351cc7fb30a9d231ab08e0be774c Mon Sep 17 00:00:00 2001 From: Faisal I <118456685+faisalill@users.noreply.github.com> Date: Fri, 2 Dec 2022 19:56:52 +0530 Subject: [PATCH] updated code mirror Changed the props of code mirror component since it was outdated --- leetcode-clone/client/src/App.jsx | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/leetcode-clone/client/src/App.jsx b/leetcode-clone/client/src/App.jsx index d8573de..6a3ea12 100644 --- a/leetcode-clone/client/src/App.jsx +++ b/leetcode-clone/client/src/App.jsx @@ -1,8 +1,8 @@ import { useState } from 'react'; import './App.css'; import axios from 'axios'; -import 'codemirror/keymap/sublime'; -import 'codemirror/theme/dracula.css'; +import {sublime} from '@uiw/codemirror-theme-sublime' +import {python} from '@codemirror/lang-python' import CodeMirror from '@uiw/react-codemirror'; function App() { @@ -32,18 +32,13 @@ function App() { ); })} - { - setCode(editor.getValue()); - }} - className="w-96 h-80" - /> + {setcode(value)} + className="w-96 h-80" + />
checkCode()} className="border-2 p-2 bg-green-600"