]> git.localhorst.tv Git - alttp.git/blobdiff - resources/js/components/rounds/Item.js
linebreaks in tech attribution
[alttp.git] / resources / js / components / rounds / Item.js
index 92f55a06791098adda7b299ebf241665874ccdff..817069f98dc1fb7552188ed0cbfcb80a9d326dcd 100644 (file)
@@ -51,7 +51,7 @@ const Item = ({
                                {i18n.t('rounds.date', { date: new Date(round.created_at) })}
                        </p>
                        <p className="seed">
-                               {round.code ?
+                               {round.code && round.code.length ?
                                        <>
                                                <SeedCode code={round.code} game={round.game || 'alttpr'} />
                                                <br />
@@ -73,6 +73,9 @@ const Item = ({
                                        />
                                </p>
                        : null}
+                       {tournament.type === 'open-async' && round.results && round.results.length ?
+                               <p>{i18n.t('rounds.numberOfResults', { count: round.results.length })}</p>
+                       : null}
                        <div className="button-bar">
                                <LockButton round={round} tournament={tournament} />
                                {mayEditRound(user, tournament, round) ?
@@ -91,12 +94,15 @@ Item.propTypes = {
                game: PropTypes.string,
                locked: PropTypes.bool,
                number: PropTypes.number,
+               results: PropTypes.arrayOf(PropTypes.shape({
+               })),
                seed: PropTypes.string,
                title: PropTypes.string,
        }),
        tournament: PropTypes.shape({
                participants: PropTypes.arrayOf(PropTypes.shape({
                })),
+               type: PropTypes.string,
        }),
        user: PropTypes.shape({
        }),