Skip to content

Commit

Permalink
fix: data disappears when re-clicking active tab/filter on admin board
Browse files Browse the repository at this point in the history
  • Loading branch information
shahmargi12 committed Sep 11, 2024
1 parent f58f609 commit 48f1370
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions src/components/shared/templates/AdminBoard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,6 @@ export default function CommonAdminBoard({

const resetAppCards = useCallback(
(value: string, type: string) => {
setState({ type: ActionKind.SET_APPS_AND_APP_CARDS, payload: [] })
setState({
type: ActionKind.SET_REQUEST_BODY,
payload: {
Expand Down Expand Up @@ -468,16 +467,19 @@ export default function CommonAdminBoard({
refetch={refetch}
/>
)}
{!isFetching && data?.meta && data?.meta?.totalPages > page + 1 && (
<div
style={{
textAlign: 'center',
marginTop: '30px',
}}
>
<LoadMoreButton onClick={nextPage} label={loadMoreButtonText} />
</div>
)}
{!isFetching &&
appCards?.length > 0 &&
data?.meta &&
data?.meta?.totalPages > page + 1 && (
<div
style={{
textAlign: 'center',
marginTop: '30px',
}}
>
<LoadMoreButton onClick={nextPage} label={loadMoreButtonText} />
</div>
)}
</div>
<div style={{ height: '66px' }}></div>
</div>
Expand Down

0 comments on commit 48f1370

Please sign in to comment.