Convert props to const where possible

This commit is contained in:
Rūdolfs Ošiņš
2025-03-17 21:49:11 -06:00
parent 3e37465572
commit d4a2677f57
3 changed files with 3 additions and 9 deletions
+1 -3
View File
@@ -21,15 +21,13 @@
codeComments?: CodeComments;
}
/* eslint-disable prefer-const */
let {
const {
patchId,
revision,
rid,
showCommits = true,
codeComments,
}: Props = $props();
/* eslint-enable prefer-const */
let hideChanges = $state(false);
let filesExpanded = $state(true);
+1 -3
View File
@@ -24,9 +24,7 @@
loadPatch: () => Promise<void>;
}
/* eslint-disable prefer-const */
let { rid, patchId, revision, config, status, loadPatch }: Props = $props();
/* eslint-enable prefer-const */
const { rid, patchId, revision, config, status, loadPatch }: Props = $props();
let hideReviews = $state(
revision.reviews === undefined || revision.reviews.length === 0,
+1 -3
View File
@@ -29,8 +29,7 @@
loadPatch: () => Promise<void>;
}
/* eslint-disable prefer-const */
let {
const {
rid,
repoDelegates,
patchId,
@@ -39,7 +38,6 @@
status,
loadPatch,
}: Props = $props();
/* eslint-enable prefer-const */
const commentThreads = $derived(
((revision.discussion &&