File tree Expand file tree Collapse file tree 6 files changed +6
-86
lines changed
packages/app/src/app/pages/Sandbox/Editor/Workspace Expand file tree Collapse file tree 6 files changed +6
-86
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ interface IModuleEntryProps {
1919 directories : Directory [ ] ,
2020 id : string
2121 ) => string ;
22- renameValidator : ( id : string , title : string ) => string ;
22+ renameValidator : ( id : string , title : string ) => string | false | null ;
2323}
2424
2525const ModuleEntry : React . FC < IModuleEntryProps > = ( {
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ interface IDirectoryChildrenProps {
2020 directories : Directory [ ] ,
2121 id : string
2222 ) => string ;
23- renameValidator : ( id : string , title : string ) => boolean ;
23+ renameValidator : ( id : string , title : string ) => string | false | null ;
2424}
2525
2626const DirectoryChildren : React . FC < IDirectoryChildrenProps > = ( {
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ interface Props {
2121 onCommit : ( value : string , force ?: boolean ) => void ;
2222 onChange : ( value : string ) => void ;
2323 onCancel : ( ) => void ;
24- error : string | null ;
24+ error : string | false | null ;
2525 id : string ;
2626}
2727
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ import EntryTitle from './EntryTitle';
1818import { EntryTitleInput } from './EntryTitleInput' ;
1919
2020interface IEntryProps {
21- renameValidator : ( id : string , title : string ) => string ;
21+ renameValidator : ( id : string , title : string ) => string | false | null ;
2222 shortid : string ;
2323 id : string ;
2424 title : string ;
@@ -74,7 +74,7 @@ const Entry: React.FC<IEntryProps> = ({
7474 state : incomingState = '' ,
7575} ) => {
7676 const [ state , setState ] = useState ( incomingState ) ;
77- const [ error , setError ] = useState < string | null > ( null ) ;
77+ const [ error , setError ] = useState < string | false | null > ( null ) ;
7878 const [ hovering , setHovering ] = useState ( false ) ;
7979
8080 const resetState = ( ) => {
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ type ContainerStylesProps = {
99 depth ?: number ;
1010 active ?: boolean ;
1111 editing ?: boolean ;
12- nameValidationError ?: string ;
12+ nameValidationError ?: string | null | false ;
1313 rightColors ?: string [ ] ;
1414} ;
1515
You can’t perform that action at this time.
0 commit comments