Skip to content

Commit f27bd11

Browse files
committed
Define types better
1 parent 3c8b0a9 commit f27bd11

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

pages/heatmap/+Page.client.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ export function Page() {
1919

2020
function PageHeader() {
2121
const visitsToday = getVisitsToday();
22-
console.log('visitsToday', visitsToday);
2322

2423
const Visit = !visitsToday ?
2524
h('p', 'Loading visits...') :
@@ -134,7 +133,7 @@ function Map() {
134133

135134
function getAllCoords() {
136135
return useAPIResult('/api/matomo', {
137-
date: '2025-01-01,today',
136+
date: '2022-01-01,today',
138137
period: 'range',
139138
filter_limit: 10000,
140139
filter_offset: 0,
@@ -143,7 +142,7 @@ function getAllCoords() {
143142
})
144143
}
145144

146-
function getTodayCoords() {
145+
function getTodayCoords(): Array<{ latitude: number, longitude: number }> | undefined {
147146
return useAPIResult('/api/matomo', {
148147
date: 'today',
149148
period: 'day',
@@ -154,7 +153,7 @@ function getTodayCoords() {
154153
})
155154
}
156155

157-
function getVisitsToday() {
156+
function getVisitsToday(): { visits: number, visitors: number } | undefined {
158157
return useAPIResult('/api/matomo', {
159158
method: "Live.getCounters",
160159
idSite: 1,

0 commit comments

Comments
 (0)