diff options
| author | Adam Soltys <[email protected]> | 2023-01-07 23:44:02 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-01-07 23:44:02 -0800 |
| commit | e0671101e4b217ff891fad85482e5943aa5cf543 (patch) | |
| tree | 638adbe0f5de8c5bdad4c9fc2cc25f5135bce8ff /src/lib | |
| parent | 14734c6f178ff5c3be1f4afa8f8a07af437c1322 (diff) | |
| download | coinos-ui-e0671101e4b217ff891fad85482e5943aa5cf543.tar.gz coinos-ui-e0671101e4b217ff891fad85482e5943aa5cf543.zip | |
avatar fix
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/utils.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/utils.js b/src/lib/utils.js index 279dcb98..c1ec5e5b 100644 --- a/src/lib/utils.js +++ b/src/lib/utils.js @@ -10,10 +10,8 @@ export function scroll(section) { } const base = browser ? '' : PUBLIC_COINOS_URL; -export const punk = (k) => { - let n = k ? parseInt(k.slice(-2), 16) : parseInt(Math.random() * 255); - return Math.floor((n / 256) * 64) + 1 + '.webp'; -}; + +export const punk = (k) => Math.floor((parseInt(k.slice(-2), 16) / 256) * 64) + 1 + '.webp'; export const g = (url, fetch, headers) => fetch(base + url, { headers }) |
