mirror of
https://github.com/gabehf/Koito.git
synced 2026-03-09 07:28:55 -07:00
correctly set the default range of ActivityGrid
This commit is contained in:
parent
986b71dcbc
commit
abd4de319e
1 changed files with 2 additions and 1 deletions
|
|
@ -43,7 +43,8 @@ export default function ActivityOptsSelector({
|
|||
|
||||
useEffect(() => {
|
||||
if (!disableCache) {
|
||||
const cachedRange = parseInt(localStorage.getItem('activity_range_' + window.location.pathname.split('/')[1]) ?? '35');
|
||||
// TODO: the '182' here overwrites the default range as configured in the ActivityGrid. This is bad. Only one of these should determine the default.
|
||||
const cachedRange = parseInt(localStorage.getItem('activity_range_' + window.location.pathname.split('/')[1]) ?? '182');
|
||||
if (cachedRange) rangeSetter(cachedRange);
|
||||
const cachedStep = localStorage.getItem('activity_step_' + window.location.pathname.split('/')[1]);
|
||||
if (cachedStep) stepSetter(cachedStep);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue