deletes redundant useEffect and changes title config

This commit is contained in:
jessop 2019-10-21 14:06:12 -04:00 committed by Sean Yesmunt
parent b2079d561c
commit 92b558cfe8
3 changed files with 6 additions and 9 deletions

View file

@ -3,6 +3,7 @@ const config = {
WEBPACK_ELECTRON_PORT: 9091,
WEB_SERVER_PORT: 1337,
DOMAIN: 'https://beta.lbry.tv',
SITE_TITLE: 'lbry.tv',
};
config.DOMAIN_LOCAL = `http://localhost:${config.WEB_SERVER_PORT}`;

View file

@ -7,7 +7,7 @@ import ChannelPage from 'page/channel';
import FilePage from 'page/file';
import Page from 'component/page';
import Button from 'component/button';
import { DOMAIN } from 'config';
import { SITE_TITLE } from 'config';
type Props = {
isResolvingUri: boolean,
@ -27,10 +27,6 @@ function ShowPage(props: Props) {
const { channelName, channelClaimId, streamName, streamClaimId } = parseURI(uri);
const signingChannel = claim && claim.signing_channel;
useEffect(() => {
if (!isResolvingUri && resolveUri) resolveUri(uri);
}, [resolveUri]);
useEffect(() => {
// @if TARGET='web'
if (claim && claim.canonical_url) {
@ -40,7 +36,7 @@ function ShowPage(props: Props) {
}
}
// @endif
if (!isResolvingUri && uri && claim === undefined) {
if (resolveUri && !isResolvingUri && uri && claim === undefined) {
resolveUri(uri);
}
}, [resolveUri, isResolvingUri, claim, uri]);
@ -53,11 +49,11 @@ function ShowPage(props: Props) {
} else if (channelName) {
document.title = channelName;
} else {
document.title = IS_WEB ? DOMAIN : 'LBRY';
document.title = IS_WEB ? SITE_TITLE : 'LBRY';
}
return () => {
document.title = IS_WEB ? DOMAIN : 'LBRY';
document.title = IS_WEB ? SITE_TITLE : 'LBRY';
};
}, [title, channelName, streamName]);

View file

@ -832,4 +832,4 @@
"If you don't choose a file, the file from your existing claim %name% will be used": "If you don't choose a file, the file from your existing claim %name% will be used",
"To enable this feature, check 'Save Password' the next time you start the app.": "To enable this feature, check 'Save Password' the next time you start the app.",
"An email address is required to sync your account.": "An email address is required to sync your account."
}
}