make the loading pokemon more predictable
This commit is contained in:
parent
4b43415d06
commit
7b2fcc4b6a
2
dist/main-bundle.js
vendored
2
dist/main-bundle.js
vendored
File diff suppressed because one or more lines are too long
@ -26,7 +26,8 @@ export class Loading extends React.Component<ILoadingProps> {
|
|||||||
'sprite',
|
'sprite',
|
||||||
);
|
);
|
||||||
|
|
||||||
const groupIndex = Math.floor(Math.random() * pokemonGroups.length);
|
// get the last digit of the timestamp and translate it to an index of pokemonGroups
|
||||||
|
const groupIndex = Math.floor(((Math.floor(+new Date() / 10000) % 10) / 10) * pokemonGroups.length);
|
||||||
const pokemonIcons = pokemonGroups[groupIndex].map((dex) => {
|
const pokemonIcons = pokemonGroups[groupIndex].map((dex) => {
|
||||||
const pokemonCss = classNames(
|
const pokemonCss = classNames(
|
||||||
pokemonIconCss,
|
pokemonIconCss,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user