{#if newKey} handleCreate(detail)} on:cancel={() => (newKey = null)} /> {/if} {#if secret} (secret = '')} /> {/if} {#if editKey} handleUpdate(detail)} on:cancel={() => (editKey = null)} /> {/if} {#if deleteKey} handleDelete()} on:cancel={() => (deleteKey = null)} /> {/if}
{#if keys.length > 0} {#each keys as key, index} {#key key.id} {/key} {/each}
Name Created Action
{key.name} {new Date(key.createdAt).toLocaleDateString($locale, format)}
{/if}