Skip to content

Commit 6764a2d

Browse files
ftonatoCompuIves
authored andcommitted
🔨 Refactor, 🧠 Overmind, Hacktoberfest - /app/pages/common/Modals/PRModal/index.js: convert to tsx and uses overmind (#2803)
* refactor /app/pages/common/Modals/PRModal/index.js: convert to tsx and uses overmind * refactor /app/pages/common/Modals/LiveSessionEnded/index.js: convert to tsx and uses overmind Co-authored-by: Eliamar Tani <[email protected]> * fix import and name
1 parent 25d3730 commit 6764a2d

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

‎packages/app/src/app/components/GitProgress/GitProgress.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import React from 'react';
22
import {
33
Container,
4+
Cube,
45
DeployAnimationContainer,
6+
DeployText,
57
GitHubLogo,
6-
Cube,
78
OpaqueLogo,
8-
DeployText,
99
Result,
1010
} from './elements';
1111

1212
interface IGitProgressProps {
13-
result: string;
13+
result: string | null;
1414
message: string;
1515
}
1616

‎packages/app/src/app/pages/common/Modals/LiveSessionEnded/index.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import React, { FunctionComponent } from 'react';
55
import { Explanation, Heading } from '../elements';
66
import { Container } from './elements';
77

8-
const LiveModeEnded: FunctionComponent = () => {
8+
export const LiveSessionEnded: FunctionComponent = () => {
99
const {
1010
state: {
1111
editor: {
@@ -18,9 +18,11 @@ const LiveModeEnded: FunctionComponent = () => {
1818
editor: { forkSandboxClicked },
1919
},
2020
} = useOvermind();
21+
2122
const suggestion = owned
2223
? 'you can continue working on the current sandbox.'
2324
: 'you can continue working by forking the sandbox or by creating a new sandbox.';
25+
2426
return (
2527
<Container>
2628
<Heading>The live session has ended</Heading>
@@ -58,5 +60,3 @@ const LiveModeEnded: FunctionComponent = () => {
5860
</Container>
5961
);
6062
};
61-
62-
export default LiveModeEnded;

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
import React from 'react';
1+
import React, { FunctionComponent } from 'react';
22
import { useOvermind } from 'app/overmind';
33
import { GitProgress } from 'app/components/GitProgress';
44

5-
const PRModal: React.FC = () => {
6-
let result = null;
7-
5+
const PRModal: FunctionComponent = () => {
86
const {
97
state: {
108
git: { isCreatingPr, pr },
119
},
1210
} = useOvermind();
1311

12+
let result = null;
13+
1414
if (!isCreatingPr) {
1515
result = (
1616
<div>
@@ -33,4 +33,4 @@ const PRModal: React.FC = () => {
3333
);
3434
};
3535

36-
export default PRModal;
36+
export default PRModal

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { EmptyTrash } from './EmptyTrash';
1717
import ExportGitHubModal from './ExportGitHubModal';
1818
import { FeedbackModal } from './FeedbackModal';
1919
import { ForkServerModal } from './ForkServerModal';
20-
import LiveSessionEnded from './LiveSessionEnded';
20+
import { LiveSessionEnded } from './LiveSessionEnded';
2121
import LiveSessionVersionMismatch from './LiveSessionVersionMismatch';
2222
import NetlifyLogs from './NetlifyLogs';
2323
import NewSandbox from './NewSandbox';

0 commit comments

Comments
 (0)