Commit f15f283f authored by Axel Bocciarelli's avatar Axel Bocciarelli

Fix logbook of embargoed investigations appearing publicly

parent afa79157
Pipeline #33328 passed with stage
in 3 minutes and 48 seconds
import moment from 'moment';
import axios from 'axios';
import React from 'react';
import { connect } from 'react-redux';
......@@ -281,10 +282,12 @@ class LogbookContainer extends React.Component {
componentDidMount() {
this.getAllEventsAndRefresh(this.state.view);
const { releaseDate } = this.props.investigation;
const isReleased = !!releaseDate && moment().isAfter(releaseDate);
this.props.setLogbookContext({
name: LOGBOOK_CONTEXT_NAME_PROPOSAL,
isReleased: false,
// isReleased: !!this.props.investigation.releaseDate,
isReleased,
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment