chg: usr: fine-tune the recent battle list #8
All checks were successful
Deploy to Production / deploy (push) Successful in 27s
All checks were successful
Deploy to Production / deploy (push) Successful in 27s
This commit is contained in:
@@ -69,9 +69,11 @@ export const BattleDialog = ({ games }) => {
|
||||
const endReason = resign
|
||||
? `${resign.charAt(0).toUpperCase() + resign.slice(1)} resigned`
|
||||
: 26 <= maxPoints ? 'Points' : 'Abandoned';
|
||||
const shareUrl = `${window.location.origin}/battle/${game.uuid}`;
|
||||
const canContinue = !resign && 26 > maxPoints;
|
||||
const canShare = !canContinue;
|
||||
const bothRegistered = game.bothRegistered;
|
||||
const canContinue = bothRegistered && !resign && 26 > maxPoints;
|
||||
const playUrl = `${window.location.origin}/play/${game.uuid}`;
|
||||
const shareUrl = `${window.location.origin}/battle/${game.uuid}`;
|
||||
|
||||
const duration = formatDuration(game.created, game.date);
|
||||
const pointDiff = Math.abs((game.redPoints ?? 0) - (game.bluePoints ?? 0));
|
||||
@@ -108,7 +110,7 @@ export const BattleDialog = ({ games }) => {
|
||||
<i className="fa fa-play" />
|
||||
Continue
|
||||
</a>
|
||||
) : (
|
||||
) : canShare ? (
|
||||
<button
|
||||
className={`bd-share${copied ? ' bd-share--copied' : ''}`}
|
||||
onClick={handleShare}
|
||||
@@ -118,7 +120,7 @@ export const BattleDialog = ({ games }) => {
|
||||
<i className={`fa ${copied ? 'fa-check' : 'fa-share-alt'}`} />
|
||||
{copied ? 'Copied!' : 'Share'}
|
||||
</button>
|
||||
)}
|
||||
) : null}
|
||||
<button className="bd-close" onClick={() => setOpen(false)} aria-label="Close">
|
||||
<i className="fa fa-times" />
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user