]> git.localhorst.tv Git - alttp.git/blobdiff - resources/js/components/rounds/Item.js
allow setting seeds
[alttp.git] / resources / js / components / rounds / Item.js
index b227e9334798ffe89dae08775a3098458b47a8b1..d352cd126263fb49044157ff31b093a1c658609e 100644 (file)
@@ -3,9 +3,10 @@ import React from 'react';
 import { Button } from 'react-bootstrap';
 import { withTranslation } from 'react-i18next';
 
+import SeedButton from './SeedButton';
 import List from '../results/List';
 import ReportButton from '../results/ReportButton';
-import { isParticipant } from '../../helpers/permissions';
+import { maySetSeed, isParticipant } from '../../helpers/permissions';
 import { findParticipant } from '../../helpers/Tournament';
 import { withUser } from '../../helpers/UserContext';
 import i18n from '../../i18n';
@@ -18,13 +19,12 @@ const Item = ({
 <li className="round d-flex">
        <div className="info">
                <p className="date">{i18n.t('rounds.date', { date: new Date(round.created_at) })}</p>
-               {round.seed ?
-                       <p className="seed">
-                               <Button href={round.seed} target="_blank" variant="primary">
-                                       {i18n.t('rounds.seed')}
-                               </Button>
-                       </p>
-               : null}
+               <p className="seed">
+                       <SeedButton
+                               round={round}
+                               tournament={tournament}
+                       />
+               </p>
                {isParticipant(user, tournament) ?
                        <p className="report">
                                <ReportButton