This commit is contained in:
Timothy Jaeryang Baek committed 2026-07-26 21:02:31 -04:00
1 parent f798d05586
commit db5c092299
1 file changed
-14
-14
View File
@@ -151,9 +151,6 @@
foldersLoaded = true; foldersLoaded = true;
}; };
const getFolderName = (folderId: string | null): string | null =>
folderId ? (($folders ?? []).find((folder) => folder.id === folderId)?.name ?? null) : null;
const toggleHandler = async (automation: AutomationResponse) => { const toggleHandler = async (automation: AutomationResponse) => {
const res = await toggleAutomationById(localStorage.token, automation.id).catch((err) => { const res = await toggleAutomationById(localStorage.token, automation.id).catch((err) => {
toast.error(`${err}`); toast.error(`${err}`);
@@ -344,7 +341,6 @@
loaded = true; loaded = true;
syncHeader(); syncHeader();
void ensureFolders();
return () => { return () => {
clearTimeout(searchDebounceTimer); clearTimeout(searchDebounceTimer);
@@ -537,7 +533,6 @@
{:else} {:else}
<div class="gap-y-0.5 grid my-1"> <div class="gap-y-0.5 grid my-1">
{#each automations as automation (automation.id)} {#each automations as automation (automation.id)}
{@const folderName = getFolderName(automation.folder_id)}
<div <div
role="button" role="button"
tabindex="0" tabindex="0"
@@ -565,15 +560,6 @@
</div> </div>
</Tooltip> </Tooltip>
{#if folderName}
<div
class="max-w-32 shrink-0 truncate rounded-md bg-sky-500/10 px-1.5 py-0.5 text-[10px] leading-4 text-sky-600 dark:bg-sky-400/10 dark:text-sky-300"
title={folderName}
>
{folderName}
</div>
{/if}
<Tooltip <Tooltip
content={automation.last_run_at content={automation.last_run_at
? dayjs(automation.last_run_at / 1000000).format('LLLL') ? dayjs(automation.last_run_at / 1000000).format('LLLL')