mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-11 10:58:57 +01:00
Fix network sessions showing wrong table header
This commit is contained in:
parent
adc4162217
commit
ab2dfbbbcf
@ -84,7 +84,8 @@ const SessionBody = ({i, session}) => {
|
||||
const SessionAccordion = (
|
||||
{
|
||||
sessions,
|
||||
isPlayer
|
||||
isPlayer,
|
||||
isNetwork
|
||||
}
|
||||
) => {
|
||||
const {t} = useTranslation();
|
||||
@ -99,7 +100,10 @@ const SessionAccordion = (
|
||||
firstColumn,
|
||||
<><Fa icon={faClock}/> {t('html.label.sessionStart')}</>,
|
||||
<><Fa icon={faClock}/> {t('html.label.length')}</>,
|
||||
<><Fa icon={faMap}/> {t('html.label.mostPlayedWorld')}</>
|
||||
<>
|
||||
{!isNetwork && <><Fa icon={faMap}/> {t('html.label.mostPlayedWorld')}</>}
|
||||
{isNetwork && <><Fa icon={faServer}/> {t('html.label.server')}</>}
|
||||
</>
|
||||
]} slices={sessions.map(session => {
|
||||
return {
|
||||
body: <SessionBody session={session}/>,
|
||||
|
@ -6,7 +6,7 @@ import Scrollable from "../../Scrollable";
|
||||
import SessionAccordion from "../../accordion/SessionAccordion";
|
||||
import React from "react";
|
||||
|
||||
const RecentSessionsCard = ({sessions, isPlayer}) => {
|
||||
const RecentSessionsCard = ({sessions, isPlayer, isNetwork}) => {
|
||||
const {t} = useTranslation();
|
||||
return (
|
||||
<Card>
|
||||
@ -19,7 +19,7 @@ const RecentSessionsCard = ({sessions, isPlayer}) => {
|
||||
</h6>
|
||||
</Card.Header>
|
||||
<Scrollable>
|
||||
<SessionAccordion sessions={sessions} isPlayer={isPlayer}/>
|
||||
<SessionAccordion sessions={sessions} isPlayer={isPlayer} isNetwork={isNetwork}/>
|
||||
</Scrollable>
|
||||
</Card>
|
||||
)
|
||||
|
@ -10,7 +10,7 @@ const ServerRecentSessionsCard = ({identifier}) => {
|
||||
if (loadingError) return <ErrorViewCard error={loadingError}/>
|
||||
|
||||
return (
|
||||
<RecentSessionsCard sessions={data?.sessions} isPlayer={true}/>
|
||||
<RecentSessionsCard sessions={data?.sessions} isPlayer={true} isNetwork={!identifier}/>
|
||||
)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user