From 2bbad82f212041ed68c252c9739c5b5290a7bb33 Mon Sep 17 00:00:00 2001 From: iiTzArcur Date: Thu, 28 Nov 2024 23:21:23 +0100 Subject: [PATCH] encode the servername if prefix is not available --- .../routes/Servers/Detailed/Main.tsx | 102 +++++++++--------- 1 file changed, 48 insertions(+), 54 deletions(-) diff --git a/src/components/routes/Servers/Detailed/Main.tsx b/src/components/routes/Servers/Detailed/Main.tsx index d754dc4..53f816f 100644 --- a/src/components/routes/Servers/Detailed/Main.tsx +++ b/src/components/routes/Servers/Detailed/Main.tsx @@ -117,7 +117,7 @@ export function Results(props: Views): React.ReactElement { .reduce((acc, key) => ((acc[key] = modCategories[key]), acc), {}); let widgetReturn = props.getter === "name" - ? props.serverName + ? encodeURIComponent(props.serverName) : encodeURIComponent(stats?.prefix); let widgetItem = "name"; @@ -249,9 +249,8 @@ export function Results(props: Views): React.ReactElement {

{t("servers.permLink")}{" "}

@@ -296,27 +295,27 @@ export function Results(props: Views): React.ReactElement {
{loading ? [...Array(4)].map((key, index) => ( - - )) + + )) : stats?.rotation?.map( - (key: ServerRotation, index: number) => - key && ( - - ), - )} + (key: ServerRotation, index: number) => + key && ( + + ), + )}
)} @@ -371,24 +370,24 @@ export function Results(props: Views): React.ReactElement { isError={props.error} /> ) : // older titles - stats?.ip && stats?.port ? ( - - ) : ( - props.game.includes("marne") && ( - - // - ) - )} + ) : ( + props.game.includes("marne") && ( + + // + ) + )} )} {/* bf4 */} @@ -438,7 +437,7 @@ export function Results(props: Views): React.ReactElement { value.values[0].readableSettingName, )} - : {} + : { } {value.values[1].readableSettingName}

@@ -549,13 +548,10 @@ export function Results(props: Views): React.ReactElement { > {t(`servers.iframe.${element}`)}{" "} `} + message={``} stateTranslation={"servers.iframe.states"} />

@@ -564,11 +560,9 @@ export function Results(props: Views): React.ReactElement { ) : (