fix(analytics): period key '1d' (Сегодня) not in PERIOD_DAYS map — fell back to 30 days; add '1d' to both hooks
This commit is contained in:
parent
c0ebe7f59f
commit
56cb4b460f
|
|
@ -1,8 +1,8 @@
|
|||
const isLocalhost = self.location.hostname === "localhost" || self.location.hostname === "127.0.0.1";
|
||||
|
||||
if (!isLocalhost) {
|
||||
const STATIC_CACHE = "construction-delivery-static-v113";
|
||||
const RUNTIME_CACHE = "construction-delivery-runtime-v113";
|
||||
const STATIC_CACHE = "construction-delivery-static-v114";
|
||||
const RUNTIME_CACHE = "construction-delivery-runtime-v114";
|
||||
const APP_SHELL_URLS = ["/", "/client", "/index.html", "/manifest.webmanifest", "/icons/icon-192.png", "/icons/icon-512.png"];
|
||||
|
||||
self.addEventListener("install", (event) => {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { useState, useEffect, useCallback } from "react";
|
||||
import { supabase, hasSupabaseConfig } from "../supabaseClient";
|
||||
|
||||
const PERIOD_DAYS = { today: 1, "7d": 7, "30d": 30, all: 0 };
|
||||
const PERIOD_DAYS = { today: 1, "1d": 1, "7d": 7, "30d": 30, all: 0 };
|
||||
|
||||
const rpcCall = async (fnName, params) => {
|
||||
if (!hasSupabaseConfig || !supabase) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { useState, useEffect, useCallback } from "react";
|
||||
import { supabase, hasSupabaseConfig } from "../supabaseClient";
|
||||
|
||||
const PERIOD_DAYS = { today: 1, "7d": 7, "30d": 30, all: 0 };
|
||||
const PERIOD_DAYS = { today: 1, "1d": 1, "7d": 7, "30d": 30, all: 0 };
|
||||
|
||||
export const usePickupStats = (period = "7d") => {
|
||||
const [stats, setStats] = useState(null);
|
||||
|
|
|
|||
Loading…
Reference in New Issue