+ <>
+
+
+ {/* TODO Fork form needs redesigning (better selection of exercises).
- {isAuthorOfPipeline(pipeline.id) && (
-
-
-
- )}
- {/* TODO Fork form needs redesigning (better selection of exercises).
forkPipeline(forkId, formData)}
- /> */}
+ />
-
+ */}
+
{(...runtimes) => (
@@ -103,7 +97,7 @@ class Pipeline extends Component {
-
+ >
)}
);
@@ -118,41 +112,33 @@ Pipeline.propTypes = {
pipelineId: PropTypes.string.isRequired,
}).isRequired,
}).isRequired,
- isAuthorOfPipeline: PropTypes.func.isRequired,
- links: PropTypes.object.isRequired,
forkPipeline: PropTypes.func.isRequired,
runtimeEnvironments: PropTypes.array,
};
-export default withLinks(
- connect(
- (
- state,
- {
- match: {
- params: { pipelineId },
- },
- }
- ) => {
- const userId = loggedInUserIdSelector(state);
-
- return {
- pipeline: getPipeline(pipelineId)(state),
- userId: loggedInUserIdSelector(state),
- isAuthorOfPipeline: pipelineId => canEditPipeline(userId, pipelineId)(state),
- runtimeEnvironments: pipelineEnvironmentsSelector(pipelineId)(state),
- };
- },
- (
- dispatch,
- {
- match: {
- params: { pipelineId },
- },
- }
- ) => ({
- loadAsync: () => Pipeline.loadAsync({ pipelineId }, dispatch),
- forkPipeline: (forkId, data) => dispatch(forkPipeline(pipelineId, forkId, data)),
- })
- )(Pipeline)
-);
+export default connect(
+ (
+ state,
+ {
+ match: {
+ params: { pipelineId },
+ },
+ }
+ ) => {
+ return {
+ pipeline: getPipeline(pipelineId)(state),
+ runtimeEnvironments: pipelineEnvironmentsSelector(pipelineId)(state),
+ };
+ },
+ (
+ dispatch,
+ {
+ match: {
+ params: { pipelineId },
+ },
+ }
+ ) => ({
+ loadAsync: () => Pipeline.loadAsync({ pipelineId }, dispatch),
+ forkPipeline: (forkId, data) => dispatch(forkPipeline(pipelineId, forkId, data)),
+ })
+)(Pipeline);