mirror of
https://github.com/gabehf/Koito.git
synced 2026-03-15 10:25: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(() => {
|
useEffect(() => {
|
||||||
if (!disableCache) {
|
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);
|
if (cachedRange) rangeSetter(cachedRange);
|
||||||
const cachedStep = localStorage.getItem('activity_step_' + window.location.pathname.split('/')[1]);
|
const cachedStep = localStorage.getItem('activity_step_' + window.location.pathname.split('/')[1]);
|
||||||
if (cachedStep) stepSetter(cachedStep);
|
if (cachedStep) stepSetter(cachedStep);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue