frontend: DO IT THE SVELTE WAY

This commit is contained in:
Alex
2025-03-03 17:51:12 +01:00
parent 8d56a9ad48
commit 68851c6257

View File

@@ -99,14 +99,6 @@
);
}
/**
* Sets the active tab
* @param {string} tab - The tab to set as active
*/
function setActiveTab(tab) {
activeTab = tab;
}
/** @type {import('../../routes/auth/about/[id]/$types').SubmitFunction} */
const handleUpdate = async () => {
isUpdating = true;
@@ -158,7 +150,7 @@
type="button"
class="button-dark"
class:active={activeTab === tab}
on:click={() => setActiveTab(tab)}
on:click={() => (activeTab = tab)}
>
{$t(tab)}
</button>