File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed
pages/Sandbox/Editor/Workspace/Files/DirectoryEntry Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export const signIn: AsyncAction<{ useExtraScopes?: boolean }> = async (
3434 effects . analytics . setUserId ( state . user . id ) ;
3535 actions . internal . setStoredSettings ( ) ;
3636 effects . live . connect ( ) ;
37- actions . userNotifications . internal . initialize ( ) ; // Seemed a bit differnet originally?
37+ actions . userNotifications . internal . initialize ( ) ; // Seemed a bit different originally?
3838 actions . refetchSandboxInfo ( ) ;
3939 } catch ( error ) {
4040 actions . internal . addNotification ( {
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 ) => boolean ;
22+ renameValidator : ( id : string , title : string ) => string ;
2323}
2424
2525const ModuleEntry : React . FC < IModuleEntryProps > = ( {
@@ -42,12 +42,13 @@ const ModuleEntry: React.FC<IModuleEntryProps> = ({
4242 const isActive = module . shortid === currentModuleShortid ;
4343 const isMainModule = module . id === mainModule . id ;
4444 const type = getType ( module . title ) ;
45- const hasError = module . errors . length ;
45+ const hasError = module . errors . length > 0 ;
4646 const liveUsers = live . liveUsersByModule [ module . shortid ] || [ ] ;
4747
4848 const isNotSynced = module . savedCode && module . code !== module . savedCode ;
4949
5050 return (
51+ // @ts -ignore
5152 < Entry
5253 id = { module . id }
5354 shortid = { module . shortid }
Original file line number Diff line number Diff line change 11import theme from '@codesandbox/common/lib/theme' ;
22import { ContextMenu , Item } from 'app/components/ContextMenu' ;
3+ import { Module , Directory } from '@codesandbox/common/lib/types' ;
34import React , { useState } from 'react' ;
45import { DragSource } from 'react-dnd' ;
56import EditIcon from 'react-icons/lib/go/pencil' ;
@@ -35,6 +36,11 @@ interface IEntryProps {
3536 onClick : ( ) => void ;
3637 markTabsNotDirty : ( ) => void ;
3738 onRenameCancel ?: ( ) => void ;
39+ getModulePath : (
40+ modules : Module [ ] ,
41+ directories : Directory [ ] ,
42+ id : string
43+ ) => string ;
3844 isNotSynced : boolean ;
3945 isMainModule : boolean ;
4046 moduleHasError : boolean ;
@@ -163,6 +169,8 @@ const Entry: React.FC<IEntryProps> = ({
163169 < EntryContainer
164170 onClick = { setCurrentModule ? setCurrentModuleAction : onClick }
165171 onDoubleClick = { markTabsNotDirty }
172+ // The elements file is still in js
173+ // @ts -ignore
166174 depth = { depth }
167175 nameValidationError = { error }
168176 active = { active }
You can’t perform that action at this time.
0 commit comments