@@ -23,12 +23,13 @@ import {
2323 useToast ,
2424 VStack ,
2525 Checkbox ,
26+ Textarea ,
2627} from "@chakra-ui/react" ;
2728import { useWeb3React } from "@web3-react/core" ;
2829import CodeEditorPreview from "components/custom/CodeEditorPreview" ;
29- import useCustomColor from "core/hooks/useCustomColor" ;
3030import { Contract , ethers } from "ethers" ;
31- import dynamic from "next/dynamic" ;
31+ // import useCustomColor from "core/hooks/useCustomColor";
32+ // import dynamic from "next/dynamic";
3233import { useRouter } from "next/router" ;
3334import { ChangeEvent , useContext , useEffect , useMemo , useState } from "react" ;
3435import { useFormContext } from "react-hook-form" ;
@@ -92,17 +93,17 @@ const questTypeOptions = [
9293 } ,
9394] ;
9495
95- const CodeEditor = dynamic ( ( ) => import ( "@uiw/react-textarea-code-editor" ) , {
96- ssr : false ,
97- } ) ;
96+ // const CodeEditor = dynamic(() => import("@uiw/react-textarea-code-editor"), {
97+ // ssr: false,
98+ // });
9899
99100const CreateQuestForm : React . FunctionComponent = ( ) => {
100101 const router = useRouter ( ) ;
101102 const toast = useToast ( ) ;
102103 const [ code , setCode ] = useState < string > ( ) ;
103104 const [ isWithRewards , setIsWithRewards ] = useState < boolean > ( ) ;
104105 const [ submitStatus , setSubmitStatus ] = useState < string > ( "Creating quest" ) ;
105- const { codeEditorScheme } = useCustomColor ( ) ;
106+ // const { codeEditorScheme } = useCustomColor();
106107 const { tokens } = useTokenList ( ) ;
107108 const { library, chainId } = useWeb3React ( ) ;
108109 const { self, account, contracts } = useContext ( Web3Context ) ;
@@ -498,7 +499,13 @@ const CreateQuestForm: React.FunctionComponent = () => {
498499
499500 < FormControl isInvalid = { errors . description } >
500501 < FormLabel htmlFor = "description" > Description</ FormLabel >
501- < CodeEditor
502+ < Textarea
503+ placeholder = "Quest description"
504+ { ...register ( "description" , {
505+ required : REQUIRED_FIELD_LABEL ,
506+ } ) }
507+ />
508+ { /* <CodeEditor
502509 value={code}
503510 language="markdown"
504511 placeholder="Quest description (markdown)"
@@ -515,7 +522,7 @@ const CreateQuestForm: React.FunctionComponent = () => {
515522 }}
516523 className={codeEditorScheme}
517524 padding={15}
518- />
525+ /> */ }
519526 < FormErrorMessage >
520527 { errors . description && errors . description . message }
521528 </ FormErrorMessage >
0 commit comments