Add no teams found message to other pages
This commit is contained in:
parent
bba89795a5
commit
4e4f7d2c03
3 changed files with 36 additions and 21 deletions
|
|
@ -71,7 +71,8 @@ const ProfileRoute: React.FC<Props> = ({
|
||||||
recordCount,
|
recordCount,
|
||||||
parties,
|
parties,
|
||||||
setParties,
|
setParties,
|
||||||
isFetching,
|
loaded,
|
||||||
|
fetching,
|
||||||
setFetching,
|
setFetching,
|
||||||
fetchError,
|
fetchError,
|
||||||
fetch,
|
fetch,
|
||||||
|
|
@ -155,6 +156,13 @@ const ProfileRoute: React.FC<Props> = ({
|
||||||
}
|
}
|
||||||
|
|
||||||
const renderInfiniteScroll = (
|
const renderInfiniteScroll = (
|
||||||
|
<>
|
||||||
|
{parties.length === 0 && !loaded && renderLoading(3)}
|
||||||
|
{parties.length === 0 && loaded && (
|
||||||
|
<div className="notFound">
|
||||||
|
<h2>There are no teams with your specified filters</h2>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
<InfiniteScroll
|
<InfiniteScroll
|
||||||
dataLength={parties && parties.length > 0 ? parties.length : 0}
|
dataLength={parties && parties.length > 0 ? parties.length : 0}
|
||||||
next={() => setCurrentPage(currentPage + 1)}
|
next={() => setCurrentPage(currentPage + 1)}
|
||||||
|
|
@ -163,6 +171,7 @@ const ProfileRoute: React.FC<Props> = ({
|
||||||
>
|
>
|
||||||
<GridRepCollection>{renderParties()}</GridRepCollection>
|
<GridRepCollection>{renderParties()}</GridRepCollection>
|
||||||
</InfiniteScroll>
|
</InfiniteScroll>
|
||||||
|
</>
|
||||||
)
|
)
|
||||||
|
|
||||||
if (context) {
|
if (context) {
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,8 @@ const SavedRoute: React.FC<Props> = ({
|
||||||
recordCount,
|
recordCount,
|
||||||
parties,
|
parties,
|
||||||
setParties,
|
setParties,
|
||||||
isFetching,
|
loaded,
|
||||||
|
fetching,
|
||||||
setFetching,
|
setFetching,
|
||||||
fetchError,
|
fetchError,
|
||||||
fetch,
|
fetch,
|
||||||
|
|
@ -150,6 +151,13 @@ const SavedRoute: React.FC<Props> = ({
|
||||||
}
|
}
|
||||||
|
|
||||||
const renderInfiniteScroll = (
|
const renderInfiniteScroll = (
|
||||||
|
<>
|
||||||
|
{parties.length === 0 && !loaded && renderLoading(3)}
|
||||||
|
{parties.length === 0 && loaded && (
|
||||||
|
<div className="notFound">
|
||||||
|
<h2>There are no teams with your specified filters</h2>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
<InfiniteScroll
|
<InfiniteScroll
|
||||||
dataLength={parties && parties.length > 0 ? parties.length : 0}
|
dataLength={parties && parties.length > 0 ? parties.length : 0}
|
||||||
next={() => setCurrentPage(currentPage + 1)}
|
next={() => setCurrentPage(currentPage + 1)}
|
||||||
|
|
@ -158,6 +166,7 @@ const SavedRoute: React.FC<Props> = ({
|
||||||
>
|
>
|
||||||
<GridRepCollection>{renderParties()}</GridRepCollection>
|
<GridRepCollection>{renderParties()}</GridRepCollection>
|
||||||
</InfiniteScroll>
|
</InfiniteScroll>
|
||||||
|
</>
|
||||||
)
|
)
|
||||||
|
|
||||||
if (context) {
|
if (context) {
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,6 @@ import { CollectionPage } from '~utils/enums'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
context?: PageContextObj
|
context?: PageContextObj
|
||||||
query: { [key: string]: string }
|
|
||||||
version: AppUpdate
|
version: AppUpdate
|
||||||
error: boolean
|
error: boolean
|
||||||
status?: ResponseStatus
|
status?: ResponseStatus
|
||||||
|
|
@ -40,7 +39,6 @@ interface Props {
|
||||||
|
|
||||||
const TeamsRoute: React.FC<Props> = ({
|
const TeamsRoute: React.FC<Props> = ({
|
||||||
context,
|
context,
|
||||||
query,
|
|
||||||
version,
|
version,
|
||||||
error,
|
error,
|
||||||
status,
|
status,
|
||||||
|
|
@ -212,7 +210,6 @@ export const getServerSideProps = async ({ req, res, locale, query }: { req: Nex
|
||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
context: { raidGroups },
|
context: { raidGroups },
|
||||||
query,
|
|
||||||
version,
|
version,
|
||||||
error: false,
|
error: false,
|
||||||
...(await serverSideTranslations(locale, ['common'])),
|
...(await serverSideTranslations(locale, ['common'])),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue