-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add pagination and search to orgs page (#32)
* wip pagination * feat add pagination and search * wip * wip add load orgs instead reload * update after review * add desc for search in enum * fix search * fix after review * update after review * minor fixes * fix: orgs list response type * fix: orgs api helper * feat: remove isEmpty in useLoading * feat: return isEmpty in useLoading * fix: change useLoading types in List * add todo * add second todo
- Loading branch information
1 parent
39739c0
commit b596145
Showing
10 changed files
with
150 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { Grid, Stack, useTheme } from '@mui/material' | ||
|
||
import { UiSkeleton } from '@/ui' | ||
|
||
interface Props { | ||
cardsCount: number | ||
} | ||
|
||
export default function ListSkeleton({ cardsCount }: Props) { | ||
const { spacing } = useTheme() | ||
return ( | ||
<> | ||
<Grid container spacing={6}> | ||
{Array.from({ length: cardsCount }).map((_, idx) => ( | ||
<Grid key={idx} item xs={6}> | ||
<UiSkeleton variant='rounded' sx={{ borderRadius: 3 }} height={spacing(60)} /> | ||
</Grid> | ||
))} | ||
</Grid> | ||
<Stack alignItems='center' mt={6}> | ||
<UiSkeleton variant='rounded' height={spacing(6)} width={spacing(80)} /> | ||
</Stack> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
export { default as List } from './List' | ||
export { default as ListCard } from './ListCard' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { Skeleton, type SkeletonProps, useTheme } from '@mui/material' | ||
|
||
interface Props extends SkeletonProps {} | ||
|
||
export default function UiSkeleton({ ...rest }: Props) { | ||
const { palette } = useTheme() | ||
return <Skeleton {...rest} sx={{ bgcolor: palette.divider, ...rest.sx }} /> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters