const preact = require('preact'); function Scoreboard(args) { const { isPlayer, player, } = args; const scoreText = () => { if (player.score === 'Zero') return [▫, ▫, ▫]; if (player.score === 'One') return [■, ▫, ▫]; if (player.score === 'Two') return [■, ■, ▫]; if (player.score === 'Win') return [■, ■, ■]; return ''; }; /* let scoreText = () => { if (player.score === 'Zero') return '▫▫▫▫'; if (player.score === 'One') return '■▫▫▫'; if (player.score === 'Two') return '■■▫▫'; if (player.score === 'Three') return '■■■▫'; if (player.score === 'Adv') return '■■■+'; if (player.score === 'Win') return '■■■■'; return ''; }; */ const imgStyle = player.img ? { 'background-image': `url(/imgs/${player.img}.svg)` } : null; if (!isPlayer) { return (