list sessions according to the fetch status
This commit is contained in:
parent
97d23a6bcb
commit
49d3e2a4ac
|
|
@ -40,7 +40,7 @@ function JKMusicSessions() {
|
||||||
<CardBody className="pt-0">
|
<CardBody className="pt-0">
|
||||||
{loadingStatus === 'loading' && sessions.length === 0 ? (
|
{loadingStatus === 'loading' && sessions.length === 0 ? (
|
||||||
<Loader />
|
<Loader />
|
||||||
) : isIterableArray(sessions) ? (
|
) : loadingStatus === "succeeded" && sessions.length > 0 ? (
|
||||||
<>
|
<>
|
||||||
{greaterThan.sm ? (
|
{greaterThan.sm ? (
|
||||||
<Row className="mb-3 justify-content-between d-none d-md-block">
|
<Row className="mb-3 justify-content-between d-none d-md-block">
|
||||||
|
|
@ -54,7 +54,7 @@ function JKMusicSessions() {
|
||||||
</Row>
|
</Row>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
) : (
|
) : loadingStatus === "succeeded" && sessions.length <= 0 ? (
|
||||||
<Row className="p-card">
|
<Row className="p-card">
|
||||||
<Col>
|
<Col>
|
||||||
{t('list.no_records_1', { ns: 'sessions' })}
|
{t('list.no_records_1', { ns: 'sessions' })}
|
||||||
|
|
@ -62,7 +62,13 @@ function JKMusicSessions() {
|
||||||
{t('list.no_records_2', { ns: 'sessions' })}
|
{t('list.no_records_2', { ns: 'sessions' })}
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
)}
|
) : loadingStatus === "failed" ? (
|
||||||
|
<Row className="p-card">
|
||||||
|
<Col>
|
||||||
|
{t('list.error', { ns: 'sessions' })}
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
) : null }
|
||||||
</CardBody>
|
</CardBody>
|
||||||
</Card>
|
</Card>
|
||||||
<JKModalDialog
|
<JKModalDialog
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,8 @@
|
||||||
},
|
},
|
||||||
"no_records_1": "There are no public, open sessions currently available for you to join. We suggest you ",
|
"no_records_1": "There are no public, open sessions currently available for you to join. We suggest you ",
|
||||||
"create_session": "create a session",
|
"create_session": "create a session",
|
||||||
"no_records_2": " that others can join now, or wait a bit and then refresh this page in your browser to see if new public sessions have been started."
|
"no_records_2": " that others can join now, or wait a bit and then refresh this page in your browser to see if new public sessions have been started.",
|
||||||
|
"error": "There was an error retrieving the session list. Please try again."
|
||||||
},
|
},
|
||||||
"lobby": {
|
"lobby": {
|
||||||
"page_title": "Lobby",
|
"page_title": "Lobby",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue