X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=resources%2Fjs%2Fcomponents%2Frounds%2FSeedButton.js;h=71299cc7b84c0036b30da90cc3422f7b477ad4df;hb=b45c183b7ba39080b6438c6238bad614c4d3953e;hp=1d68b6a833ca129caa9b481cf40182b8df488c46;hpb=a907ef7c6676fef11f42933b2d79bdd496b20122;p=alttp.git diff --git a/resources/js/components/rounds/SeedButton.js b/resources/js/components/rounds/SeedButton.js index 1d68b6a..71299cc 100644 --- a/resources/js/components/rounds/SeedButton.js +++ b/resources/js/components/rounds/SeedButton.js @@ -12,13 +12,23 @@ const SeedButton = ({ round, tournament, user }) => { const [showDialog, setShowDialog] = useState(false); if (round.seed) { - return ( + return <> - ); + {round.spoiler ? + + : null} + ; } - if (maySetSeed(user, tournament)) { + if (maySetSeed(user, tournament, round)) { return <> setShowDialog(false)} @@ -36,6 +46,7 @@ const SeedButton = ({ round, tournament, user }) => { SeedButton.propTypes = { round: PropTypes.shape({ seed: PropTypes.string, + spoiler: PropTypes.string, }), tournament: PropTypes.shape({ }),