Skip to content

Commit 7294937

Browse files
committed
Fix create PR modal
1 parent 56fe4db commit 7294937

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

packages/app/src/app/overmind/namespaces/git/actions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ export const descriptionChanged: Action<{
105105
};
106106

107107
export const createPrClicked: AsyncAction = async ({ state, effects }) => {
108-
state.git.pr = null;
109108
state.git.isCreatingPr = true;
109+
state.git.pr = null;
110110
state.currentModal = 'pr';
111111
const sandbox = state.editor.currentSandbox;
112112
if (!sandbox) {

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

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,25 @@ import { ButtonContainer } from './elements';
88
export const PRModal: FunctionComponent = () => {
99
const {
1010
state: {
11-
git: {
12-
isCreatingPr,
13-
pr: { prURL },
14-
},
11+
git: { isCreatingPr, pr },
1512
},
1613
} = useOvermind();
1714

1815
return (
1916
<GitProgress
2017
message="Forking Repository & Creating PR..."
2118
result={
22-
isCreatingPr ? (
19+
isCreatingPr ? null : (
2320
<div>
2421
{`Done! We'll now open the new sandbox of this PR and GitHub in 3 seconds...`}
2522

2623
<ButtonContainer>
27-
<a href={prURL} rel="noreferrer noopener" target="_blank">
24+
<a href={pr.prURL} rel="noreferrer noopener" target="_blank">
2825
Click here if nothing happens.
2926
</a>
3027
</ButtonContainer>
3128
</div>
32-
) : null
29+
)
3330
}
3431
/>
3532
);

0 commit comments

Comments
 (0)