fix: fix sessions

This commit is contained in:
SD 2024-03-27 19:18:58 +04:00
parent 32e9294725
commit ef859f52d0
1 changed files with 2 additions and 2 deletions

View File

@ -115,7 +115,7 @@ export const SessionsTabs = ({ intlConfig, locale }: { intlConfig: Record<string
label: (
<>
{intlConfig?.upcoming || 'Tab 1'}
{sessions?.upcoming?.length > 0 ? (<span className="count">{sessions?.upcoming.length}</span>) : null}
{sessions?.upcoming && sessions?.upcoming?.length > 0 ? (<span className="count">{sessions?.upcoming.length}</span>) : null}
</>
),
children: getChildren(sessions?.upcoming)
@ -125,7 +125,7 @@ export const SessionsTabs = ({ intlConfig, locale }: { intlConfig: Record<string
label: (
<>
{intlConfig?.requested || 'Tab 2'}
{sessions?.requested?.length > 0 ? (<span className="count">{sessions?.requested.length}</span>) : null}
{sessions?.requested && sessions?.requested?.length > 0 ? (<span className="count">{sessions?.requested.length}</span>) : null}
</>
),
children: getChildren(sessions?.requested)