Skip to content

Commit c5ce0e6

Browse files
MichaelDeBoeyCompuIves
authored andcommitted
Prettify codebase (codesandbox#2968)
1 parent e49771d commit c5ce0e6

File tree

9 files changed

+68
-79
lines changed

9 files changed

+68
-79
lines changed

packages/app/src/app/pages/Sandbox/Editor/Workspace/Project/Keywords.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ import { useOvermind } from 'app/overmind';
88

99
import { Item } from './elements';
1010

11-
interface IKeywordsProps {
11+
type Props = {
1212
editable?: boolean;
1313
};
14-
export const Keywords: FunctionComponent<IKeywordsProps> = ({ editable }) => {
14+
export const Keywords: FunctionComponent<Props> = ({ editable }) => {
1515
const {
1616
actions: {
1717
workspace: { tagChanged, tagsChanged },

packages/app/src/app/pages/Sandbox/SignOutNoticeModal/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ export const SignOutNotice = () => {
4343
</Row>
4444
</Container>
4545
);
46-
}
46+
};

packages/app/src/app/pages/common/Modals/PRModal/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ const PRModal: FunctionComponent = () => {
3333
);
3434
};
3535

36-
export default PRModal
36+
export default PRModal;

packages/app/src/app/pages/common/Modals/PreferencesModal/Badges/index.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
import React, {FunctionComponent} from 'react';
2-
import { useOvermind } from 'app/overmind';
3-
41
import Margin from '@codesandbox/common/lib/components/spacing/Margin';
52
import Badge from '@codesandbox/common/lib/utils/badges/Badge';
3+
import React, { FunctionComponent } from 'react';
4+
5+
import { useOvermind } from 'app/overmind';
6+
67
import { Title } from '../elements';
78

89
export const Badges: FunctionComponent = () => {
910
const {
1011
state: {
11-
user: {badges},
12+
user: { badges },
1213
},
1314
actions: {
14-
preferences: {setBadgeVisibility},
15+
preferences: { setBadgeVisibility },
1516
},
1617
} = useOvermind();
1718
const badgesCount = badges.length;
@@ -43,5 +44,4 @@ export const Badges: FunctionComponent = () => {
4344
</Margin>
4445
</div>
4546
);
46-
}
47-
47+
};

packages/app/src/app/pages/common/Modals/SelectSandboxModal/index.tsx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,16 @@ import Sandbox from './Sandbox';
77
export const SelectSandboxModal: FunctionComponent = () => {
88
const {
99
state: {
10-
profile: {
11-
isLoadingSandboxes,
12-
showcasedSandbox,
13-
userSandboxes
14-
}
10+
profile: { isLoadingSandboxes, showcasedSandbox, userSandboxes },
1511
},
1612
actions: {
17-
profile: { newSandboxShowcaseSelected }
18-
}
13+
profile: { newSandboxShowcaseSelected },
14+
},
1915
} = useOvermind();
2016

21-
if (isLoadingSandboxes)
17+
if (isLoadingSandboxes) {
2218
return <Padding>Loading sandboxes...</Padding>;
19+
}
2320

2421
const currentShowcasedSandboxId = showcasedSandbox && showcasedSandbox.id;
2522

Lines changed: 43 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
import React from 'react';
21
import filesize from 'filesize';
2+
import React, { FunctionComponent } from 'react';
3+
34
import { useOvermind } from 'app/overmind';
5+
46
import {
57
Container,
68
Title,
@@ -13,56 +15,48 @@ import {
1315
} from './elements';
1416
import FilesList from './FilesList';
1517

16-
export const StorageManagementModal: React.FC = () => {
18+
export const StorageManagementModal: FunctionComponent = () => {
1719
const {
18-
state: {
19-
usedStorage,
20-
maxStorage,
21-
uploadedFiles
22-
},
20+
state: { usedStorage, maxStorage, uploadedFiles },
2321
actions: {
24-
files: {
25-
deletedUploadedFile,
26-
addedFileToSandbox,
27-
28-
}
29-
}
22+
files: { deletedUploadedFile, addedFileToSandbox },
23+
},
3024
} = useOvermind();
3125

32-
const isLoading = uploadedFiles === null;
33-
const isEmpty = !isLoading && uploadedFiles.length === 0;
26+
const isLoading = uploadedFiles === null;
27+
const isEmpty = !isLoading && uploadedFiles.length === 0;
28+
29+
return (
30+
<Container>
31+
<JustifiedArea>
32+
<Title>Storage Management</Title>
33+
34+
<SubTitle>
35+
Used {filesize(usedStorage)}
36+
{' / '}
37+
Total {filesize(maxStorage)}
38+
</SubTitle>
39+
</JustifiedArea>
40+
41+
<Description>
42+
This is where you can manage your uploaded files.
43+
</Description>
44+
45+
<Rule />
46+
47+
{!isEmpty && !isLoading && (
48+
<FilesList
49+
files={uploadedFiles}
50+
deleteFile={deletedUploadedFile}
51+
deleteFiles={files => files.map(id => deletedUploadedFile({ id }))}
52+
addFilesToSandbox={files => files.map(addedFileToSandbox)}
53+
addFileToSandbox={addedFileToSandbox}
54+
/>
55+
)}
56+
57+
{isEmpty && <SubDescription>You have no uploaded files.</SubDescription>}
3458

35-
return (
36-
<Container>
37-
<JustifiedArea>
38-
<Title>Storage Management</Title>
39-
<SubTitle>
40-
Used {filesize(usedStorage)}
41-
{' / '}
42-
Total {filesize(maxStorage)}
43-
</SubTitle>
44-
</JustifiedArea>
45-
<Description>
46-
This is where you can manage your uploaded files.
47-
</Description>
48-
<Rule />
49-
{!isEmpty && !isLoading && (
50-
<FilesList
51-
files={uploadedFiles}
52-
deleteFile={deletedUploadedFile}
53-
deleteFiles={files =>
54-
files.map(id => deletedUploadedFile({ id }))
55-
}
56-
addFilesToSandbox={files =>
57-
files.map(addedFileToSandbox)
58-
}
59-
addFileToSandbox={addedFileToSandbox}
60-
/>
61-
)}
62-
{isEmpty && (
63-
<SubDescription>You have no uploaded files.</SubDescription>
64-
)}
65-
{isLoading && <LoadingAnimationContainer />}
66-
</Container>
67-
);
68-
}
59+
{isLoading && <LoadingAnimationContainer />}
60+
</Container>
61+
);
62+
};

packages/homepage/content/docs/2-importing.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,16 +177,17 @@ example sandbox of that is here:
177177
You can export a local component to CodeSandbox by using our other
178178
[CLI](https://github.com/codesandbox/codesandboxer/tree/master/packages/codesandboxer-fs).
179179

180-
You can install our CLI by running `npm install -g codesandboxer-fs`. Then you can
181-
export a project by running `codesandboxer {filePath}`.
180+
You can install our CLI by running `npm install -g codesandboxer-fs`. Then you
181+
can export a project by running `codesandboxer {filePath}`.
182182

183183
```
184184
$ npm install -g codesandboxer-fs
185185
$ codesandboxer docs/examples/my-single-component.js
186186
```
187187

188-
This will print out the id of a sandbox that does nothing but render the targeted component, along with a link to that sandbox. This will also bundle in other local files used by the component to ensure render.
189-
188+
This will print out the id of a sandbox that does nothing but render the
189+
targeted component, along with a link to that sandbox. This will also bundle in
190+
other local files used by the component to ensure render.
190191

191192
## Import Using React-Codesandboxer
192193

packages/homepage/content/docs/3-deployment.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,8 @@ With [Netlify](https://netlify.com) you don't even need to connect to your
3333
account. This means you can create deployments to share and use even if you
3434
don't have a [Netlify](https://netlify.com) account.
3535

36-
Some templates are better than others, but as of now, we
37-
have a number of templates that support [Netlify](https://netlify.com)
38-
deployments:
36+
Some templates are better than others, but as of now, we have a number of
37+
templates that support [Netlify](https://netlify.com) deployments:
3938

4039
- React
4140
- Vue

packages/homepage/src/css/global.css

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,10 @@ twitter-widget {
5151
margin-right: auto;
5252
}
5353

54-
@media screen and
55-
(prefers-reduced-motion: reduce),
56-
(update: slow) {
54+
@media screen and (prefers-reduced-motion: reduce), (update: slow) {
5755
* {
5856
animation-duration: 0.001ms !important;
5957
animation-iteration-count: 1 !important;
6058
transition-duration: 0.001ms !important;
6159
}
62-
}
60+
}

0 commit comments

Comments
 (0)