Skip to content

Commit

Permalink
Change banner + Show only active CTA and change date display
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexis committed Dec 19, 2023
1 parent 990fd82 commit 93cc23d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Binary file added public/img/banner-calls.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/component/item/Article.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default class Article extends Component {
return "";
}

if (this.props.info.type === "EVENT") {
if (this.props.info.type === "EVENT" || this.props.showStartAndEndDates) {
if (this.props.info.start_date && this.props.info.end_date) {
return <div>
{dateToString(this.props.info.start_date, "DD MMM YYYY HH:mm")}
Expand Down
8 changes: 6 additions & 2 deletions src/component/page/PageCall.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { getRequest } from "../../utils/request.jsx";
import Article from "../item/Article.jsx";
import DynamicTable from "../table/DynamicTable.jsx";
import { dictToURI, getUrlParameter } from "../../utils/url.jsx";
import { dateToString } from "../../utils/date.jsx";

export default class PageNews extends React.Component {
constructor(props) {
Expand All @@ -38,6 +39,8 @@ export default class PageNews extends React.Component {
const params = {
entities: this.props.lhc.id,
taxonomy_values: this.getCallTaxonomyValue(),
max_start_date: dateToString(new Date()),
min_end_date: dateToString(new Date()),
type: "NEWS",
per_page: 10,
page: page || 1,
Expand Down Expand Up @@ -75,7 +78,7 @@ export default class PageNews extends React.Component {
return (
<div id={"PageNews"}>
<Banner
image={"/img/banner-news.jpg"}
image={"/img/banner-calls.png"}
/>

<div className={"page max-sized-page"}>
Expand All @@ -101,7 +104,7 @@ export default class PageNews extends React.Component {
&& <div className="row row-spaced">
<div className="col-md-12">
<Message
text={"No news found"}
text={"No call found"}
height={200}
/>
</div>
Expand All @@ -121,6 +124,7 @@ export default class PageNews extends React.Component {
<Article
info={a}
analytics={this.props.analytics}
showStartAndEndDates={true}
/>
</div>
}
Expand Down

0 comments on commit 93cc23d

Please sign in to comment.