lint
This commit is contained in:
parent
6c3ed54d87
commit
11a4524c4c
3 changed files with 16 additions and 9 deletions
|
@ -40,12 +40,19 @@ function UserChannelFollowIntro(props: Props) {
|
|||
useEffect(() => {
|
||||
if (channelsToSubscribe && channelsToSubscribe.length && prefsReady) {
|
||||
const delayedChannelSubscribe = () => {
|
||||
channelsToSubscribe.forEach((c) =>
|
||||
channelSubscribe({
|
||||
channelName: parseURI(c).claimName,
|
||||
uri: c,
|
||||
})
|
||||
);
|
||||
channelsToSubscribe.forEach((c) => {
|
||||
let claimName;
|
||||
try {
|
||||
const { claimName: name } = parseURI(c);
|
||||
claimName = name;
|
||||
} catch (e) {}
|
||||
if (claimName) {
|
||||
channelSubscribe({
|
||||
channelName: claimName,
|
||||
uri: c,
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
setTimeout(delayedChannelSubscribe, 1000);
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ function UserFirstChannel(props: Props) {
|
|||
function handleChannelChange(e) {
|
||||
const { value } = e.target;
|
||||
setChannel(value);
|
||||
if (!isNameValid(value, false)) {
|
||||
if (!isNameValid(value)) {
|
||||
setNameError(INVALID_NAME_ERROR);
|
||||
} else {
|
||||
setNameError();
|
||||
|
|
|
@ -36,7 +36,7 @@ type Props = {
|
|||
claimIsMine: boolean,
|
||||
claimIsPending: boolean,
|
||||
isLivestream: boolean,
|
||||
beginPublish: (string) => void,
|
||||
beginPublish: (?string) => void,
|
||||
collectionId: string,
|
||||
collection: Collection,
|
||||
collectionUrls: Array<string>,
|
||||
|
@ -157,7 +157,7 @@ function ShowPage(props: Props) {
|
|||
/>
|
||||
<Button
|
||||
button="secondary"
|
||||
onClick={() => push(`/$/${PAGES.REPOST_NEW}?to=${contentName}`)}
|
||||
onClick={() => push(`/$/${PAGES.REPOST_NEW}${contentName ? `to=${contentName}` : ''}`)}
|
||||
label={__('Repost Something')}
|
||||
/>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue