File tree Expand file tree Collapse file tree
src/routes/(console)/project-[region]-[project]/overview Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4545 platforms: Array <Models .Platform >;
4646 } = $props ();
4747
48- let platformMap = $state (new Map <string , Models .Platform >());
48+ const platformMap = $derived .by (() => {
49+ const map = new Map <string , Models .Platform >();
50+ platforms .forEach ((platform ) => {
51+ const platformInfo = getPlatformInfo (platform .type );
52+ map .set (platformInfo .name , platform );
53+ });
54+
55+ return map ;
56+ });
4957
5058 const projectRoute = $derived .by (() => {
5159 return resolve (' /(console)/project-[region]-[project]' , {
5462 });
5563 });
5664
57- onMount (() => {
58- platforms .forEach ((platform ) => {
59- const platformInfo = getPlatformInfo (platform .type );
60- platformMap .set (platformInfo .name , platform );
61- });
62- });
63-
6465 function createKey() {
6566 trackEvent (Click .KeyCreateClick , { source: ' onboarding' });
6667
You can’t perform that action at this time.
0 commit comments