]> git.localhorst.tv Git - alttp.git/blobdiff - resources/js/components/events/Detail.js
show some past episodes on concluded events
[alttp.git] / resources / js / components / events / Detail.js
index d530006b7800e48cf082a9d6c0483605e62712c3..65895482d320dd6b1ca07b740794e0435cc2b2ce 100644 (file)
@@ -1,10 +1,11 @@
 import PropTypes from 'prop-types';
 import React from 'react';
-import { Button } from 'react-bootstrap';
+import { Alert, Button } from 'react-bootstrap';
 import { useTranslation } from 'react-i18next';
 
 import Icon from '../common/Icon';
 import RawHTML from '../common/RawHTML';
+import { hasConcluded } from '../../helpers/Event';
 import { getTranslation } from '../../helpers/Technique';
 import i18n from '../../i18n';
 
@@ -32,6 +33,11 @@ const Detail = ({ actions, event }) => {
                {event.description ?
                        <RawHTML html={getTranslation(event.description, 'description', i18n.language)} />
                : null}
+               {hasConcluded(event) ?
+                       <Alert variant="info">
+                               {t('events.concluded')}
+                       </Alert>
+               : null}
        </>;
 };
 
@@ -42,6 +48,7 @@ Detail.propTypes = {
        event: PropTypes.shape({
                description: PropTypes.shape({
                }),
+               end: PropTypes.string,
                title: PropTypes.string,
        }),
 };