Skip to content

Commit 1cdd8a3

Browse files
committed
fix: build issues, typecheck
1 parent 7506e51 commit 1cdd8a3

File tree

10 files changed

+99
-1043
lines changed

10 files changed

+99
-1043
lines changed

apps/dashboard/app/(main)/websites/[id]/_components/tabs/audience-tab.tsx

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ interface ProcessedData {
102102
}
103103

104104
const formatNumber = (value: number | null | undefined): string => {
105-
if (value == null || Number.isNaN(value)) return '0';
105+
if (value == null || Number.isNaN(value)) {
106+
return '0';
107+
}
106108
return Intl.NumberFormat(undefined, {
107109
notation: 'compact',
108110
maximumFractionDigits: 1,
@@ -141,8 +143,8 @@ const getConnectionIcon = (connection: string): React.ReactNode => {
141143
return <Globe className="h-4 w-4 text-primary" />;
142144
};
143145

144-
const normalizeData = (data: string[]): GeographicEntry[] =>
145-
data?.map((item) => ({
146+
const normalizeData = (data: any[]): GeographicEntry[] =>
147+
data?.map((item: any) => ({
146148
name: item.country_name || item.name || 'Unknown',
147149
visitors: item.visitors || 0,
148150
pageviews: item.pageviews || 0,
@@ -191,7 +193,9 @@ export function WebsiteAudienceTab({
191193
} = useBatchDynamicQuery(websiteId, dateRange, batchQueries);
192194

193195
const handleRefresh = useCallback(async () => {
194-
if (!isRefreshing) return;
196+
if (!isRefreshing) {
197+
return;
198+
}
195199

196200
try {
197201
await refetchBatch();
@@ -344,10 +348,12 @@ export function WebsiteAudienceTab({
344348

345349
const processedConnectionData = useMemo((): ConnectionEntry[] => {
346350
const connectionData = processedData.device.connection_type;
347-
if (!connectionData?.length) return [];
351+
if (!connectionData?.length) {
352+
return [];
353+
}
348354

349355
const totalVisitors = connectionData.reduce(
350-
(sum: number, item: string) => sum + item.visitors,
356+
(sum: number, item: any) => sum + item.visitors,
351357
0
352358
);
353359

@@ -642,7 +648,9 @@ export function WebsiteAudienceTab({
642648

643649
// Feature detection for Intl.DisplayNames
644650
const canUseDisplayNames = useMemo(() => {
645-
if (typeof window === 'undefined') return false;
651+
if (typeof window === 'undefined') {
652+
return false;
653+
}
646654
try {
647655
// Try to construct and use .of
648656
const dn = new Intl.DisplayNames([navigator.language || 'en'], {
@@ -977,7 +985,9 @@ export function WebsiteAudienceTab({
977985
?.slice(0, 6)
978986
.map((item: ScreenResolutionEntry) => {
979987
const resolution = item.name;
980-
if (!resolution) return null;
988+
if (!resolution) {
989+
return null;
990+
}
981991
const [width, height] = resolution.split('x').map(Number);
982992
const isValid = !(
983993
Number.isNaN(width) || Number.isNaN(height)

apps/dashboard/components/layout/navigation/navigation-section.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ export function NavigationSection({
6161
icon={item.icon}
6262
isActive={isActive}
6363
isExternal={item.external}
64-
isHighlighted={item.highlight}
6564
isRootLevel={!!item.rootLevel}
6665
key={item.name}
6766
name={item.name}

packages/db/src/clickhouse/client.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import type { ResponseJSON } from '@clickhouse/client';
2-
import { createClient } from '@clickhouse/client';
1+
import { createClient, type ResponseJSON } from '@clickhouse/client';
32
import type { NodeClickHouseClientConfigOptions } from '@clickhouse/client/dist/config';
43

5-
export { createClient };
4+
export { createClient } from '@clickhouse/client';
65

76
/**
87
* ClickHouse table names used throughout the application
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
export * from './client';
2-
export * from './query_builder';
32
export * from './schema';

0 commit comments

Comments
 (0)