Skip to content

Commit dc1e5f4

Browse files
committed
fix ts
1 parent d9be2fc commit dc1e5f4

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

packages/app/src/app/overmind/internalActions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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({

packages/app/src/app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/DirectoryChildren/ModuleEntry.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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

2525
const 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}

packages/app/src/app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/Entry/index.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import theme from '@codesandbox/common/lib/theme';
22
import { ContextMenu, Item } from 'app/components/ContextMenu';
3+
import { Module, Directory } from '@codesandbox/common/lib/types';
34
import React, { useState } from 'react';
45
import { DragSource } from 'react-dnd';
56
import 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}

0 commit comments

Comments
 (0)