MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / setTimePeriod

Function setTimePeriod

console/src/components/TimePeriodSelect.tsx:30–40  ·  view source on GitHub ↗
(timePeriod: string)

Source from the content-addressed store, hash-verified

28 const navigate = useNavigate();
29 const location = useLocation();
30 const setTimePeriod = (timePeriod: string) => {
31 const searchParams = new URLSearchParams(location.search);
32 searchParams.set("timePeriod", timePeriod);
33 navigate(
34 location.pathname + "?" + searchParams.toString() + location.hash,
35 {
36 replace: true,
37 },
38 );
39 setTimePeriodMinutes(parseInt(timePeriod));
40 };
41
42 return (
43 <SimpleSelect

Callers 1

TimePeriodSelectFunction · 0.85

Calls 2

parseIntFunction · 0.85
setMethod · 0.45

Tested by

no test coverage detected