-
Notifications
You must be signed in to change notification settings - Fork 167
Update: cleanups, improvements #1966
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
The preview deployment failed. 🔴 Last updated at: 2025-06-14 09:41:24 CET |
The preview deployment failed. 🔴 Last updated at: 2025-06-14 09:41:24 CET |
src/routes/(console)/project-[region]-[project]/functions/templates/+page.ts
Outdated
Show resolved
Hide resolved
src/routes/(console)/project-[region]-[project]/functions/templates/+page.ts
Outdated
Show resolved
Hide resolved
src/routes/(console)/project-[region]-[project]/overview/+page.ts
Outdated
Show resolved
Hide resolved
src/routes/(console)/organization-[organization]/billing/+page.ts
Outdated
Show resolved
Hide resolved
<svelte:fragment slot="header" let:root> | ||
<Table.Header.Cell column="dueDate" {root}>Due date</Table.Header.Cell> | ||
<Table.Header.Cell column="status" {root}>Status</Table.Header.Cell> | ||
<Table.Header.Cell column="amount" {root}>Amount due</Table.Header.Cell> | ||
<Table.Header.Cell column="action" {root} /> | ||
</svelte:fragment> | ||
|
||
{#if isLoadingInvoices} | ||
{#each Array.from({ length: 2 }) as _} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because svelte 5 actually wants us to have keys for each. also a _
is not that clean :P
we would need to do:
{#each Array.from({ length: 2 }) as _} | |
{#each Array.from({ length: 2 }).keys() as index (index)} |
to have it clean ;-)
src/routes/(console)/organization-[organization]/usage/[[invoice]]/+page.svelte
Outdated
Show resolved
Hide resolved
0 | ||
) | ||
} | ||
]; | ||
|
||
onMount(async () => (usageProjects = await data.projectsPromise)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why dont we pass the promise and await where we actually need it? 👀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its used on multiple ProjectBreakdown
components based on the type of service. So it makes sense to load all of them here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also it adds a bit of redundant logic to maintain a promise and a resolved var with value under ProjectBreakdown
. Doesn't feel like the component's responsibility.
What does this PR do?
(Provide a description of what this PR does.)
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)
Related PRs and Issues
(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)
Have you read the Contributing Guidelines on issues?
(Write your answer here.)