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(() => {
|
useEffect(() => {
|
||||||
if (channelsToSubscribe && channelsToSubscribe.length && prefsReady) {
|
if (channelsToSubscribe && channelsToSubscribe.length && prefsReady) {
|
||||||
const delayedChannelSubscribe = () => {
|
const delayedChannelSubscribe = () => {
|
||||||
channelsToSubscribe.forEach((c) =>
|
channelsToSubscribe.forEach((c) => {
|
||||||
channelSubscribe({
|
let claimName;
|
||||||
channelName: parseURI(c).claimName,
|
try {
|
||||||
uri: c,
|
const { claimName: name } = parseURI(c);
|
||||||
})
|
claimName = name;
|
||||||
);
|
} catch (e) {}
|
||||||
|
if (claimName) {
|
||||||
|
channelSubscribe({
|
||||||
|
channelName: claimName,
|
||||||
|
uri: c,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
setTimeout(delayedChannelSubscribe, 1000);
|
setTimeout(delayedChannelSubscribe, 1000);
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ function UserFirstChannel(props: Props) {
|
||||||
function handleChannelChange(e) {
|
function handleChannelChange(e) {
|
||||||
const { value } = e.target;
|
const { value } = e.target;
|
||||||
setChannel(value);
|
setChannel(value);
|
||||||
if (!isNameValid(value, false)) {
|
if (!isNameValid(value)) {
|
||||||
setNameError(INVALID_NAME_ERROR);
|
setNameError(INVALID_NAME_ERROR);
|
||||||
} else {
|
} else {
|
||||||
setNameError();
|
setNameError();
|
||||||
|
|
|
@ -36,7 +36,7 @@ type Props = {
|
||||||
claimIsMine: boolean,
|
claimIsMine: boolean,
|
||||||
claimIsPending: boolean,
|
claimIsPending: boolean,
|
||||||
isLivestream: boolean,
|
isLivestream: boolean,
|
||||||
beginPublish: (string) => void,
|
beginPublish: (?string) => void,
|
||||||
collectionId: string,
|
collectionId: string,
|
||||||
collection: Collection,
|
collection: Collection,
|
||||||
collectionUrls: Array<string>,
|
collectionUrls: Array<string>,
|
||||||
|
@ -157,7 +157,7 @@ function ShowPage(props: Props) {
|
||||||
/>
|
/>
|
||||||
<Button
|
<Button
|
||||||
button="secondary"
|
button="secondary"
|
||||||
onClick={() => push(`/$/${PAGES.REPOST_NEW}?to=${contentName}`)}
|
onClick={() => push(`/$/${PAGES.REPOST_NEW}${contentName ? `to=${contentName}` : ''}`)}
|
||||||
label={__('Repost Something')}
|
label={__('Repost Something')}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue