Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
import React from 'react';
import { inject, observer } from 'app/componentConnectors';
import { useOvermind } from 'app/overmind';
import { GitProgress } from 'app/components/GitProgress';

function PRModal({ store }) {
const PRModal: React.FC = () => {
let result = null;

if (!store.git.isCreatingPr) {
const newUrl = store.git.pr.prURL;
const {
state: {
git: {
isCreatingPr,
pr: { prURL },
},
},
} = useOvermind();

if (!isCreatingPr) {
result = (
<div>
Done! We{"'"}ll now open the new sandbox of this PR and GitHub in 3
seconds...
<div style={{ fontSize: '.875rem', marginTop: '1rem' }}>
<a href={newUrl} target="_blank" rel="noreferrer noopener">
<a href={prURL} target="_blank" rel="noreferrer noopener">
Click here if nothing happens.
</a>
</div>
Expand All @@ -27,6 +34,6 @@ function PRModal({ store }) {
message="Forking Repository & Creating PR..."
/>
);
}
};

export default inject('store')(observer(PRModal));
export default PRModal;