Copilot commented on code in PR #3015:
URL: https://github.com/apache/apisix-dashboard/pull/3015#discussion_r2077122017
##########
src/components/form-slice/FormPartSSL/FormItemCertKeyList.tsx:
##########
@@ -54,19 +55,21 @@ const CertKeyPairList = () => {
<PairWrapper
key={cert.id}
legend={
- <Button
- leftSection={<IconDelete />}
- justify="flex-end"
- size="compact-xs"
- color="red"
- variant="outline"
- onClick={() => {
- certs.remove(idx);
- keys.remove(idx);
- }}
- >
- {t('form.ssls.cert_key_list.delete')}
- </Button>
+ !certsState.disabled && (
Review Comment:
[nitpick] For enhanced readability, consider extracting the conditional
rendering of the delete button into its own component or variable.
##########
src/routes/ssls/index.tsx:
##########
@@ -65,7 +65,9 @@ function RouteComponent() {
valueType: 'option',
key: 'option',
width: 120,
- // render: (_, record) => [],
+ render: (_, record) => [
+ <ToDetailPageBtn key="detail" to="/ssls/detail/$id" params={{ id:
record.value.id }} />,
Review Comment:
Verify that 'record.value.id' correctly references the unique identifier for
the SSL record. If the intended property is 'record.id', consider updating it
to avoid potential runtime issues.
```suggestion
<ToDetailPageBtn
key="detail"
to="/ssls/detail/$id"
params={{ id: record.value?.id || '-' }}
/>,
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]