Skip to content

Commit 89cd2e5

Browse files
authored
Merge pull request #77 from 0PandaDEV/import-queue
2 parents a193a25 + 27a51bc commit 89cd2e5

21 files changed

Lines changed: 2144 additions & 1329 deletions

File tree

app/pages/index.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ type ItemWithTime = {
274274
};
275275
276276
const toast = useToast();
277-
const userState = useState<User | null>("user");
277+
const { data: userState } = useAsyncData("user", () => $fetch("/api/user"));
278278
const chartContainer = ref<HTMLElement | null>(null);
279279
const projectSort = ref<"time" | "name">("time");
280280
const uniqueLanguages = ref(0);
@@ -873,7 +873,7 @@ function getSingleDayChartData(result: number[]): number[] {
873873
if (!relevantHeartbeats?.length) return result;
874874
875875
const now = new Date();
876-
let startDate, endDate;
876+
let startDate: Date, endDate: Date;
877877
878878
if (timeRange.value === statsLib.TimeRangeEnum.TODAY) {
879879
startDate = new Date(now);
@@ -984,7 +984,7 @@ function groupHeartbeatsByProject(
984984
if (!result[projectKey]) {
985985
result[projectKey] = [];
986986
}
987-
result[projectKey].push(hb);
987+
result[projectKey]?.push(hb);
988988
}
989989
990990
return result;

0 commit comments

Comments
 (0)