Fix custom to pre URL swaps (#2358)
This commit is contained in:
parent
37fad4ca99
commit
3f4b260d18
@ -5,6 +5,7 @@
|
||||
import { AppProps as Props } from '@polkadot/react-components/types';
|
||||
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { Trans } from 'react-i18next';
|
||||
import store from 'store';
|
||||
import styled from 'styled-components';
|
||||
import { registry } from '@polkadot/react-api';
|
||||
@ -138,9 +139,13 @@ function Developer ({ className, onStatusChange }: Props): React.ReactElement<Pr
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className='ui--row'>
|
||||
<div className='full'>
|
||||
<Trans i18nKey='devConfig'><div className='help'>If you are a development team with at least a test network available, consider adding the types directly <a href='https://github.com/polkadot-js/apps/tree/master/packages/apps-config' rel='noopener noreferrer' target='_blank'>to the apps-config</a>, allowing out of the box operation for your spec & chains, both for you and anybody trying to connect to it. This is not a replacement for your chain-specific UI, however doing so does help in allowing users to easily discover and use with zero-config.</div></Trans>
|
||||
</div>
|
||||
</div>
|
||||
<Button.Group>
|
||||
<Button
|
||||
isDisabled={typesHasNoEntries}
|
||||
isNegative
|
||||
onClick={_clearTypes}
|
||||
label={t('Reset')}
|
||||
@ -165,4 +170,8 @@ export default styled(Developer)`
|
||||
margin-left: 2rem;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.help {
|
||||
padding: 0.5rem 2rem;
|
||||
}
|
||||
`;
|
||||
|
||||
@ -79,7 +79,7 @@ function SelectUrl ({ className, onChange }: Props): React.ReactElement<Props> {
|
||||
...makeUrl(
|
||||
isCustom
|
||||
? info.url
|
||||
: availableEndpoints[0].value as string
|
||||
: (availableEndpoints.find(({ value }) => !!value) || { value: 'ws://127.0.0.1:9944' }).value as string
|
||||
),
|
||||
isCustom
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user