@@ -10,8 +10,10 @@ import { Editor as EditorRoot } from 'layout/Editor';
1010import { Heading } from 'layout/Heading' ;
1111import { EntityType , ActiveEditor } from 'providers/Project' ;
1212import { useProject } from 'providers/Project/projectHooks' ;
13+ import { PLACEHOLDER_DESCRIPTION , PLACEHOLDER_TITLE } from "providers/Project/projectDefault" ;
1314import { Account , Project } from 'api/apollo/generated/graphql' ;
1415
16+
1517import debounce from 'util/debounce' ;
1618import Mixpanel from 'util/mixpanel' ;
1719
@@ -29,6 +31,8 @@ import {
2931 Label ,
3032} from 'components/Arguments/SingleArgument/styles' ;
3133import { Markdown } from 'components/Markdown' ;
34+
35+ import { decodeText } from "util/readme" ;
3236import { CadenceLanguageServer , Callbacks } from "util/language-server" ;
3337import { MonacoServices } from "monaco-languageclient/lib/monaco-services" ;
3438import * as monaco from "monaco-editor" ;
@@ -214,9 +218,11 @@ const EditorContainer: React.FC<EditorContainerProps> = ({
214218 project,
215219 active,
216220} ) => {
217- const [ title , setTitle ] = useState < string | undefined > ( project . title ) ;
221+ const [ title , setTitle ] = useState < string | undefined > (
222+ decodeText ( project . title )
223+ ) ;
218224 const [ description , setDescription ] = useState < string | undefined > (
219- project . description ,
225+ decodeText ( project . description )
220226 ) ;
221227 const [ readme , setReadme ] = useState < string | undefined > ( project . readme ) ;
222228
@@ -371,6 +377,7 @@ const EditorContainer: React.FC<EditorContainerProps> = ({
371377 < Label > Title</ Label >
372378 < Input
373379 value = { title }
380+ placeholder = { PLACEHOLDER_TITLE }
374381 onChange = { ( event ) => {
375382 setTitle ( event . target . value ) ;
376383 updateProject ( event . target . value , description , readme ) ;
@@ -381,6 +388,7 @@ const EditorContainer: React.FC<EditorContainerProps> = ({
381388 < Label > Description</ Label >
382389 < Input
383390 value = { description }
391+ placeholder = { PLACEHOLDER_DESCRIPTION }
384392 onChange = { ( event ) => {
385393 setDescription ( event . target . value ) ;
386394 updateProject ( title , event . target . value , readme ) ;
0 commit comments