Skip to content

Commit aa0ff82

Browse files
🔨 Refactor, 🧠 Overmind, Hacktoberfest - /app/pages/common/Mod… (codesandbox#2816)
🔨 Refactor, 🧠 Overmind, Hacktoberfest - /app/pages/common/Modals/SelectSandboxModal/index.js
2 parents 30e4f6c + e2724a6 commit aa0ff82

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed
Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,25 @@
1-
import React from 'react';
1+
import React, { FunctionComponent } from 'react';
22
import { useOvermind } from 'app/overmind';
3-
import Sandbox from './Sandbox';
4-
53
import { Padding } from './elements';
64

7-
function SelectSandboxModal() {
5+
import Sandbox from './Sandbox';
6+
7+
export const SelectSandboxModal: FunctionComponent = () => {
88
const {
99
state: {
10-
profile: { isLoadingSandboxes, showcasedSandbox, userSandboxes },
10+
profile: {
11+
isLoadingSandboxes,
12+
showcasedSandbox,
13+
userSandboxes
14+
}
1115
},
1216
actions: {
13-
profile: { newSandboxShowcaseSelected },
14-
},
17+
profile: { newSandboxShowcaseSelected }
18+
}
1519
} = useOvermind();
1620

17-
if (isLoadingSandboxes) return <Padding>Loading sandboxes...</Padding>;
21+
if (isLoadingSandboxes)
22+
return <Padding>Loading sandboxes...</Padding>;
1823

1924
const currentShowcasedSandboxId = showcasedSandbox && showcasedSandbox.id;
2025

@@ -32,5 +37,4 @@ function SelectSandboxModal() {
3237
))}
3338
</div>
3439
);
35-
}
36-
export default SelectSandboxModal;
40+
};

‎packages/app/src/app/pages/common/Modals/index.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import PreferencesModal from './PreferencesModal';
2626
import PrivacyServerWarning from './PrivacyServerWarning';
2727
import PRModal from './PRModal';
2828
import SearchDependenciesModal from './SearchDependenciesModal';
29-
import SelectSandboxModal from './SelectSandboxModal';
29+
import { SelectSandboxModal } from './SelectSandboxModal';
3030
import ShareModal from './ShareModal';
3131
import SignInForTemplates from './SignInForTemplates';
3232
import { StorageManagementModal } from './StorageManagementModal';

0 commit comments

Comments
 (0)