fix: Update the type of the drop down button

Fix up the type of variable used to refernce the drop down button in the PR button component
This commit is contained in:
estib 2024-10-03 11:58:01 +02:00
parent 3fc1687f86
commit 94fa0fed5d

View File

@ -23,7 +23,7 @@
const { loading, disabled, tooltip, click }: Props = $props();
const preferredAction = persisted<Action>(Action.Create, 'projectDefaultPrAction');
let dropDown: DropDownButton;
let dropDown = $state<ReturnType<typeof DropDownButton>>();
$effect(() => {
if (!Object.values(Action).includes($preferredAction)) {
@ -49,7 +49,7 @@
label={labels[method]}
on:click={() => {
preferredAction.set(method);
dropDown.close();
dropDown?.close();
}}
/>
{/each}