Commit 6e118f27 authored by isstuev's avatar isstuev

review fixes

parent ab2f498c
......@@ -234,12 +234,14 @@ test('non verified', async({ mount, page }) => {
await expect(component).toHaveScreenshot();
});
const withAuditsTest = test.extend({
test.describe('with audits feature', () => {
const withAuditsTest = test.extend({
// eslint-disable-next-line @typescript-eslint/no-explicit-any
context: contextWithEnvs(configs.UIEnvs.hasContractAuditReports) as any,
});
});
withAuditsTest('with audits feature, no audits', async({ mount, page }) => {
withAuditsTest('no audits', async({ mount, page }) => {
await page.route(CONTRACT_API_URL, (route) => route.fulfill({
status: 200,
body: JSON.stringify(contractMock.verified),
......@@ -258,9 +260,9 @@ withAuditsTest('with audits feature, no audits', async({ mount, page }) => {
);
await expect(component).toHaveScreenshot();
});
});
withAuditsTest('with audits feature, has audits', async({ mount, page }) => {
withAuditsTest('has audits', async({ mount, page }) => {
await page.route(CONTRACT_API_URL, (route) => route.fulfill({
status: 200,
body: JSON.stringify(contractMock.verified),
......@@ -280,4 +282,5 @@ withAuditsTest('with audits feature, has audits', async({ mount, page }) => {
);
await expect(component).toHaveScreenshot();
});
});
import { Box, Button, Skeleton, useDisclosure } from '@chakra-ui/react';
import { Box, Button, useDisclosure } from '@chakra-ui/react';
import React from 'react';
import type { SmartContractSecurityAuditSubmission } from 'types/api/contract';
......@@ -61,11 +61,9 @@ const ContractSecurityAudits = ({ addressHash }: Props) => {
mt={ 2 }
>
{ data.items.map(item => (
<Skeleton isLoaded={ !isPlaceholderData } key={ item.audit_company_name + item.audit_publish_date }>
<LinkExternal href={ item.audit_report_url }>
<LinkExternal href={ item.audit_report_url } key={ item.audit_company_name + item.audit_publish_date } isLoading={ isPlaceholderData }>
{ `${ item.audit_company_name }, ${ dayjs(item.audit_publish_date).format('MMM DD, YYYY') }` }
</LinkExternal>
</Skeleton>
)) }
</ContainerWithScrollY>
</Box>
......
......@@ -20,7 +20,6 @@ const AuditSubmitterEmail = ({ control }: Props) => {
{ ...field }
required
isInvalid={ Boolean(fieldState.error) }
autoComplete="off"
/>
<InputPlaceholder text="Submitter email" error={ fieldState.error }/>
</FormControl>
......
......@@ -19,7 +19,6 @@ const AuditSubmitterName = ({ control }: Props) => {
{ ...field }
required
isInvalid={ Boolean(fieldState.error) }
autoComplete="off"
/>
<InputPlaceholder text="Submitter name" error={ fieldState.error }/>
</FormControl>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment