encode uri components in popup url
split rankings into own script
This commit is contained in:
parent
5e1bf23d17
commit
f79aab102c
|
@ -14,8 +14,9 @@ import useInterval from '../hooks/interval';
|
|||
import LogInArea from '../LogInArea';
|
||||
import Tabs from '../Tabs';
|
||||
import UserAreaContent from '../UserAreaContent';
|
||||
import Rankings from '../Rankings';
|
||||
|
||||
// eslint-disable-next-line max-len
|
||||
const Rankings = React.lazy(() => import(/* webpackChunkName: "stats" */ '../Rankings'));
|
||||
// eslint-disable-next-line max-len
|
||||
const Converter = React.lazy(() => import(/* webpackChunkName: "converter" */ '../Converter'));
|
||||
// eslint-disable-next-line max-len
|
||||
|
@ -55,8 +56,10 @@ const UserArea = () => {
|
|||
<div label={t`Profile`}>
|
||||
{(name) ? <UserAreaContent /> : <LogInArea />}
|
||||
</div>
|
||||
<div label={t`Ranking`}>
|
||||
<div label={t`Statistics`}>
|
||||
<Suspense fallback={<div>Loading...</div>}>
|
||||
<Rankings />
|
||||
</Suspense>
|
||||
</div>
|
||||
<div label={t`Converter`}>
|
||||
<Suspense fallback={<div>Loading...</div>}>
|
||||
|
|
|
@ -31,7 +31,7 @@ export function buildPopUpUrl(windowType, argsIn) {
|
|||
for (let i = 0; i < typeArr.length; i += 1) {
|
||||
const key = typeArr[i];
|
||||
if (args[key]) {
|
||||
path += `/${args[key]}`;
|
||||
path += `/${encodeURIComponent(args[key])}`;
|
||||
delete args[key];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ function getWinDataFromURL() {
|
|||
let i = Math.min(typeArr.length, argsArr.length);
|
||||
while (i > 0) {
|
||||
i -= 1;
|
||||
args[typeArr[i]] = argsArr[i];
|
||||
args[typeArr[i]] = decodeURIComponent(argsArr[i]);
|
||||
}
|
||||
}
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue
Block a user