|
36 | 36 | $: if ($authSignedInStore) {
|
37 | 37 | loadIcpSwapTickers();
|
38 | 38 | }
|
39 |
| -
|
40 |
| - let columns: ProjectsTableColumn[] = []; |
41 |
| - $: columns = [ |
42 |
| - { |
43 |
| - id: "title", |
44 |
| - title: $i18n.staking.nervous_systems, |
45 |
| - cellComponent: ProjectTitleCell, |
46 |
| - alignment: "left", |
47 |
| - templateColumns: ["2fr"], |
48 |
| - comparator: $authSignedInStore ? compareByProject : undefined, |
49 |
| - }, |
| 39 | + const commonColumns: ProjectsTableColumn[] = [ |
50 | 40 | {
|
51 | 41 | id: "stake",
|
52 | 42 | title: $i18n.neuron_detail.stake,
|
|
77 | 67 | },
|
78 | 68 | ];
|
79 | 69 |
|
| 70 | + let columns: ProjectsTableColumn[] = []; |
| 71 | + $: columns = [ |
| 72 | + { |
| 73 | + id: "title", |
| 74 | + title: $i18n.staking.nervous_systems, |
| 75 | + cellComponent: ProjectTitleCell, |
| 76 | + alignment: "left", |
| 77 | + templateColumns: ["2fr"], |
| 78 | + comparator: $authSignedInStore ? compareByProject : undefined, |
| 79 | + }, |
| 80 | + ...commonColumns, |
| 81 | + ]; |
| 82 | +
|
| 83 | + let nnsColumns: ProjectsTableColumn[] = []; |
| 84 | + $: nnsColumns = [ |
| 85 | + { |
| 86 | + id: "title", |
| 87 | + title: $i18n.staking.nervous_systems_nns, |
| 88 | + cellComponent: ProjectTitleCell, |
| 89 | + alignment: "left", |
| 90 | + templateColumns: ["2fr"], |
| 91 | + comparator: $authSignedInStore ? compareByProject : undefined, |
| 92 | + }, |
| 93 | + ...commonColumns, |
| 94 | + ]; |
| 95 | +
|
| 96 | + let snsColumns: ProjectsTableColumn[] = []; |
| 97 | + $: snsColumns = [ |
| 98 | + { |
| 99 | + id: "title", |
| 100 | + title: $i18n.staking.nervous_systems_sns, |
| 101 | + cellComponent: ProjectTitleCell, |
| 102 | + alignment: "left", |
| 103 | + templateColumns: ["2fr"], |
| 104 | + comparator: $authSignedInStore ? compareByProject : undefined, |
| 105 | + }, |
| 106 | + ...commonColumns, |
| 107 | + ]; |
| 108 | +
|
80 | 109 | let tableProjects: TableProject[];
|
81 | 110 | $: tableProjects = getTableProjects({
|
82 | 111 | universes: $selectableUniversesStore,
|
|
154 | 183 | {#if !$authSignedInStore}
|
155 | 184 | <ResponsiveTable
|
156 | 185 | tableData={nnsNeurons}
|
157 |
| - {columns} |
| 186 | + columns={nnsColumns} |
158 | 187 | on:nnsAction={handleAction}
|
159 | 188 | />
|
160 | 189 |
|
161 | 190 | <ResponsiveTable
|
162 | 191 | tableData={snsNeurons}
|
163 |
| - {columns} |
| 192 | + columns={snsColumns} |
164 | 193 | on:nnsAction={handleAction}
|
165 | 194 | />
|
166 | 195 | {:else}
|
167 | 196 | <ResponsiveTable
|
168 | 197 | tableData={nnsNeurons}
|
169 |
| - {columns} |
| 198 | + columns={nnsColumns} |
170 | 199 | on:nnsAction={handleAction}
|
171 | 200 | bind:order={$projectsTableOrderStore}
|
172 | 201 | displayTableSettings
|
|
199 | 228 | {#if snsNeurons.length > 0}
|
200 | 229 | <ResponsiveTable
|
201 | 230 | tableData={snsNeurons}
|
202 |
| - {columns} |
| 231 | + columns={snsColumns} |
203 | 232 | on:nnsAction={handleAction}
|
204 | 233 | bind:order={$projectsTableOrderStore}
|
205 | 234 | displayTableSettings
|
|
0 commit comments