Commit c0d92d89 authored by tom's avatar tom

review fixes

parent 52b25e6a
......@@ -48,6 +48,10 @@ const oldUrls = [
source: '/account/custom_abi/new',
destination: '/account/custom-abi',
},
{
source: '/account/public-tags-request',
destination: '/public-tags/submit',
},
// TRANSACTIONS
{
......
......@@ -51,7 +51,7 @@ const PublicTagsSubmitForm = ({ config, userInfo, onSubmitResult }: Props) => {
) {
router.replace({ pathname: '/public-tags/submit' }, undefined, { shallow: true });
}
}, [ router.query.addresses, router ]);
}, [ router ]);
const onFormSubmit: SubmitHandler<FormFields> = React.useCallback(async(data) => {
const requestsBody = convertFormDataToRequestsBody(data);
......
......@@ -52,7 +52,7 @@ const PublicTagsSubmitFieldAddresses = () => {
</FormControl>
</GridItem>
<GridItem display="flex" alignItems="center" columnGap={ 5 } justifyContent={{ base: 'flex-end', lg: 'flex-start' }}>
{ fields.length < LIMIT && !(fields.length > 1 && index === 0) && (
{ fields.length < LIMIT && index === fields.length - 1 && (
<IconButton
aria-label="add"
data-index={ index }
......
......@@ -50,7 +50,7 @@ const PublicTagsSubmitFieldTags = ({ tagTypes }: Props) => {
register={ register }
errors={ errors }
isDisabled={ isDisabled }
onAddClick={ fields.length < LIMIT && !(fields.length > 1 && index === 0) ? handleAddFieldClick : undefined }
onAddClick={ fields.length < LIMIT && index === fields.length - 1 ? handleAddFieldClick : undefined }
onRemoveClick={ fields.length > 1 ? handleRemoveFieldClick : undefined }
/>
);
......
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