📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
Expose timeFormat and size via context api
Blue Mousefe56e238331e
diff --git a/app/pages/Project/View/ViewProject.tsx b/app/pages/Project/View/ViewProject.tsxindex 096fdeedb..c8ebdaae0 100644--- a/app/pages/Project/View/ViewProject.tsx+++ b/app/pages/Project/View/ViewProject.tsx@@ -240,6 +240,8 @@ interface ViewProjectContextType {period: stringactivePeriod: ITBPeriodPairs | undefinedperiodPairs: ITBPeriodPairs[]+ timeFormat: '12-hour' | '24-hour'+ size: ReturnType<typeof useSize>[1]// FunctionssetDateRange: Dispatch<SetStateAction<Date[] | null>>@@ -686,7 +688,7 @@ const ViewProject = ({// @ts-expect-errorconst timeFormat = useMemo<'12-hour' | '24-hour'>(() => user.timeFormat || TimeFormat['12-hour'], [user])// ref, size using for logic with responsive chart- const [ref, size] = useSize() as any+ const [ref, size] = useSize()// rotateXAxias using for logic with responsive chartconst rotateXAxis = useMemo(() => size.width > 0 && size.width < 500, [size])// customEventsChartData is a data for custom events on a chart@@ -3738,6 +3740,8 @@ const ViewProject = ({period,activePeriod,periodPairs,+ timeFormat,+ size,// FunctionssetDateRange,