const dims = [ | const dims = [ | ||||
Math.floor((1 + Math.sqrt(4 * State.online.length - 3)) / 2), | Math.floor((1 + Math.sqrt(4 * State.online.length - 3)) / 2), | ||||
Math.ceil(Math.sqrt(State.online.length)), | Math.ceil(Math.sqrt(State.online.length)), | ||||
].map(n => Array(n).fill('1fr').join(' ')) | |||||
].map(n => Array(n || 1).fill('1fr').join(' ')) | |||||
if(innerHeight > innerWidth) dims.reverse() | if(innerHeight > innerWidth) dims.reverse() | ||||
const style = { | const style = { |