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 = (
|
const SessionAccordion = (
|
||||||
{
|
{
|
||||||
sessions,
|
sessions,
|
||||||
isPlayer
|
isPlayer,
|
||||||
|
isNetwork
|
||||||
}
|
}
|
||||||
) => {
|
) => {
|
||||||
const {t} = useTranslation();
|
const {t} = useTranslation();
|
||||||
@ -99,7 +100,10 @@ const SessionAccordion = (
|
|||||||
firstColumn,
|
firstColumn,
|
||||||
<><Fa icon={faClock}/> {t('html.label.sessionStart')}</>,
|
<><Fa icon={faClock}/> {t('html.label.sessionStart')}</>,
|
||||||
<><Fa icon={faClock}/> {t('html.label.length')}</>,
|
<><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 => {
|
]} slices={sessions.map(session => {
|
||||||
return {
|
return {
|
||||||
body: <SessionBody session={session}/>,
|
body: <SessionBody session={session}/>,
|
||||||
|
@ -6,7 +6,7 @@ import Scrollable from "../../Scrollable";
|
|||||||
import SessionAccordion from "../../accordion/SessionAccordion";
|
import SessionAccordion from "../../accordion/SessionAccordion";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
const RecentSessionsCard = ({sessions, isPlayer}) => {
|
const RecentSessionsCard = ({sessions, isPlayer, isNetwork}) => {
|
||||||
const {t} = useTranslation();
|
const {t} = useTranslation();
|
||||||
return (
|
return (
|
||||||
<Card>
|
<Card>
|
||||||
@ -19,7 +19,7 @@ const RecentSessionsCard = ({sessions, isPlayer}) => {
|
|||||||
</h6>
|
</h6>
|
||||||
</Card.Header>
|
</Card.Header>
|
||||||
<Scrollable>
|
<Scrollable>
|
||||||
<SessionAccordion sessions={sessions} isPlayer={isPlayer}/>
|
<SessionAccordion sessions={sessions} isPlayer={isPlayer} isNetwork={isNetwork}/>
|
||||||
</Scrollable>
|
</Scrollable>
|
||||||
</Card>
|
</Card>
|
||||||
)
|
)
|
||||||
|
@ -10,7 +10,7 @@ const ServerRecentSessionsCard = ({identifier}) => {
|
|||||||
if (loadingError) return <ErrorViewCard error={loadingError}/>
|
if (loadingError) return <ErrorViewCard error={loadingError}/>
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<RecentSessionsCard sessions={data?.sessions} isPlayer={true}/>
|
<RecentSessionsCard sessions={data?.sessions} isPlayer={true} isNetwork={!identifier}/>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user