mirror of
https://github.com/ershisan99/www.git
synced 2025-12-18 21:09:23 +00:00
Strip suffixes from joker key when rendering in LogParser() (#4)
This commit is contained in:
@@ -205,8 +205,7 @@ export default function LogParser() {
|
|||||||
if (keysMatch?.[1]) {
|
if (keysMatch?.[1]) {
|
||||||
currentGame.logOwnerFinalJokers = keysMatch[1]
|
currentGame.logOwnerFinalJokers = keysMatch[1]
|
||||||
.split(';')
|
.split(';')
|
||||||
|
.filter(Boolean) // Remove empty strings if any
|
||||||
.filter(Boolean) // Remove empty strings
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
@@ -763,6 +762,7 @@ export default function LogParser() {
|
|||||||
{game.logOwnerFinalJokers.length > 0 ? (
|
{game.logOwnerFinalJokers.length > 0 ? (
|
||||||
<ul className='mt-3 ml-4 flex list-inside gap-3'>
|
<ul className='mt-3 ml-4 flex list-inside gap-3'>
|
||||||
{game.logOwnerFinalJokers.map((joker, i) => {
|
{game.logOwnerFinalJokers.map((joker, i) => {
|
||||||
|
joker = joker.split('-')[0] // Remove any suffix after the key
|
||||||
const cleanName =
|
const cleanName =
|
||||||
jokers[joker]?.name ??
|
jokers[joker]?.name ??
|
||||||
cleanJokerKey(joker)
|
cleanJokerKey(joker)
|
||||||
@@ -795,6 +795,7 @@ export default function LogParser() {
|
|||||||
{game.opponentFinalJokers.length > 0 ? (
|
{game.opponentFinalJokers.length > 0 ? (
|
||||||
<ul className='mt-3 ml-4 flex list-inside gap-3'>
|
<ul className='mt-3 ml-4 flex list-inside gap-3'>
|
||||||
{game.opponentFinalJokers.map((joker, i) => {
|
{game.opponentFinalJokers.map((joker, i) => {
|
||||||
|
joker = joker.split('-')[0] // Remove any suffix after the key
|
||||||
const cleanName =
|
const cleanName =
|
||||||
jokers[joker]?.name ??
|
jokers[joker]?.name ??
|
||||||
cleanJokerKey(joker)
|
cleanJokerKey(joker)
|
||||||
@@ -1158,6 +1159,7 @@ function parseLobbyInfoLine(line: string): ParsedLobbyInfo | null {
|
|||||||
isHost: isHostMatch,
|
isHost: isHostMatch,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function cleanJokerKey(key: string): string {
|
function cleanJokerKey(key: string): string {
|
||||||
if (!key) return ''
|
if (!key) return ''
|
||||||
return key
|
return key
|
||||||
|
|||||||
Reference in New Issue
Block a user