Skip to content

Commit 6e5adaf

Browse files
committed
chore: code refactoring
1 parent 94cda5a commit 6e5adaf

3 files changed

Lines changed: 3 additions & 10 deletions

File tree

src/components/notifications/SlackConfigurationTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const SlackConfigurationTable = ({ state, deleteClickHandler }: ConfigurationTab
5959
webhookUrl: slackConfig.webhookUrl,
6060
},
6161
})),
62-
[],
62+
[state.slackConfigurationList],
6363
)
6464

6565
return (

src/components/notifications/WebhookConfigurationTable.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { FiltersTypeEnum, PaginationEnum, Table, useSearchString } from '@devtro
2222
import { InteractiveCellText } from '@Components/common/helpers/InteractiveCellText/InteractiveCellText'
2323

2424
import { ConfigurationRowActionButtonWrapper } from './ConfigTableRowActionButton'
25-
import { ConfigurationsTabTypes, SLACK_WEBHOOK_TABLE_COLUMNS } from './constants'
25+
import { BASE_CONFIG, ConfigurationsTabTypes, SLACK_WEBHOOK_TABLE_COLUMNS } from './constants'
2626
import { ConfigurationTableProps, SlackWebhookConfigurationTableRowType } from './types'
2727

2828
export const WebhookConfigurationTable = ({ state, deleteClickHandler }: ConfigurationTableProps) => {
@@ -72,7 +72,7 @@ export const WebhookConfigurationTable = ({ state, deleteClickHandler }: Configu
7272
}}
7373
filtersVariant={FiltersTypeEnum.STATE}
7474
additionalFilterProps={{
75-
initialSortKey: 'name',
75+
initialSortKey: BASE_CONFIG[0].field,
7676
}}
7777
paginationVariant={PaginationEnum.NOT_PAGINATED}
7878
filter={null}

src/components/notifications/constants.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ export const BASE_CONFIG = [
134134
{
135135
label: 'Name',
136136
field: 'name',
137-
isSortable: true,
138137
size: null,
139138
},
140139
]
@@ -150,13 +149,11 @@ export const SES_TABLE_COLUMNS: TableProps<SESConfigurationTableRowType, Filters
150149
{
151150
label: 'Access Key Id',
152151
field: 'accessKeyId',
153-
isSortable: true,
154152
size: null,
155153
},
156154
{
157155
label: "Sender's Email",
158156
field: 'email',
159-
isSortable: true,
160157
size: null,
161158
},
162159
]
@@ -166,19 +163,16 @@ export const SMTP_TABLE_COLUMNS: TableProps<SMTPConfigurationTableRowType, Filte
166163
{
167164
label: 'Host',
168165
field: 'host',
169-
isSortable: true,
170166
size: null,
171167
},
172168
{
173169
label: 'Port',
174170
field: 'port',
175-
isSortable: true,
176171
size: null,
177172
},
178173
{
179174
label: "Sender's Email",
180175
field: 'email',
181-
isSortable: true,
182176
size: null,
183177
},
184178
]
@@ -192,7 +186,6 @@ export const SLACK_WEBHOOK_TABLE_COLUMNS: TableProps<
192186
{
193187
label: 'Webhook URL',
194188
field: 'webhookUrl',
195-
isSortable: false,
196189
size: null,
197190
},
198191
]

0 commit comments

Comments
 (0)