Skip to content

Commit 55fcc9b

Browse files
committed
fix: reverted removal of types
1 parent 4167528 commit 55fcc9b

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

src/routes/(console)/project-[region]-[project]/sites/site-[site]/settings/+page.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ export const load = async ({ params, depends, parent }) => {
3333
}
3434
});
3535

36+
const enabledSpecs = specificationsList?.specifications?.filter((s) => s.enabled) ?? [];
37+
if (!enabledSpecs.some((s) => s.slug === site.specification)) {
38+
site.specification = enabledSpecs[0]?.slug;
39+
}
40+
3641
return {
3742
site,
3843
frameworks,

src/routes/(console)/project-[region]-[project]/sites/site-[site]/settings/updateBuildSettings.svelte

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,15 @@
1515
import { getFrameworkIcon } from '$lib/stores/sites';
1616
import { page } from '$app/state';
1717
18-
let { site, frameworks, specs } = $props();
18+
let {
19+
site,
20+
frameworks,
21+
specs
22+
}: {
23+
site: Models.Site;
24+
frameworks: Models.Framework[];
25+
specs: Models.SpecificationList;
26+
} = $props();
1927
2028
let frameworkKey = $state(site.framework);
2129
let installCommand = $state(site?.installCommand);

src/routes/(console)/project-[region]-[project]/sites/site-[site]/settings/updateResourceLimits.svelte

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,6 @@
6565
value: spec.slug,
6666
disabled: !spec.enabled
6767
}));
68-
69-
$: {
70-
const enabledSpecs = specs?.specifications?.filter((s) => s.enabled) ?? [];
71-
if (!enabledSpecs.some((s) => s.slug === specification)) {
72-
specification = enabledSpecs[0]?.slug;
73-
site.specification = specification;
74-
}
75-
}
7668
</script>
7769

7870
<Form onSubmit={updateLogging}>

0 commit comments

Comments
 (0)