Make state calls more consistent

This commit is contained in:
Caleb Owens 2024-08-07 14:42:42 +02:00
parent 1b6a6fc91c
commit 58043dd16e

View File

@ -60,7 +60,7 @@
// If there are zero commits we should not show the author
const ownedByUser = $derived($branchListingDetails?.numberOfCommits === 0);
let lastCommitDetails: { authorName: string; lastCommitAt?: Date } | undefined = $state();
let lastCommitDetails = $state<{ authorName: string; lastCommitAt?: Date }>();
$effect(() => {
let canceled = false;
@ -83,7 +83,7 @@
}
});
let avatars: { name: string; gravatarUrl: string }[] = $state([]);
let avatars = $state<{ name: string; gravatarUrl: string }[]>([]);
$effect(() => {
setAvatars(ownedByUser, $branchListingDetails);