Fix a few types
This commit is contained in:
parent
353eae44f2
commit
063e6e3e9c
2 changed files with 3 additions and 3 deletions
|
@ -25,7 +25,7 @@ import { _t } from './languageHandler';
|
||||||
const TOAST_KEY = 'rebrand';
|
const TOAST_KEY = 'rebrand';
|
||||||
const NAG_INTERVAL = 24 * 60 * 60 * 1000;
|
const NAG_INTERVAL = 24 * 60 * 60 * 1000;
|
||||||
|
|
||||||
function getRedirectUrl(url) {
|
function getRedirectUrl(url): string {
|
||||||
const redirectUrl = new URL(url);
|
const redirectUrl = new URL(url);
|
||||||
redirectUrl.hash = '';
|
redirectUrl.hash = '';
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ function getRedirectUrl(url) {
|
||||||
if (url.hostname !== newUrl.hostname || url.pathname !== newUrl.pathname) {
|
if (url.hostname !== newUrl.hostname || url.pathname !== newUrl.pathname) {
|
||||||
redirectUrl.hostname = newUrl.hostname;
|
redirectUrl.hostname = newUrl.hostname;
|
||||||
redirectUrl.pathname = newUrl.pathname;
|
redirectUrl.pathname = newUrl.pathname;
|
||||||
return redirectUrl;
|
return redirectUrl.toString();
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
} else if (url.hostname === 'riot.im') {
|
} else if (url.hostname === 'riot.im') {
|
||||||
|
|
|
@ -26,7 +26,7 @@ export enum RebrandDialogKind {
|
||||||
};
|
};
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
onFinished: () => void;
|
onFinished: (bool) => void;
|
||||||
kind: RebrandDialogKind,
|
kind: RebrandDialogKind,
|
||||||
targetUrl?: string,
|
targetUrl?: string,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue