fix: update cards quantity (#4905)

* Fixed constants to follow new page size

* Fixed page size to be consistent with 3 columns being shown
This commit is contained in:
Lucas Oliveira 2024-11-28 13:40:00 -03:00 committed by GitHub
commit dc87faa7a1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View file

@ -946,13 +946,13 @@ export const maxSizeFilesInBytes = 10 * 1024 * 1024; // 10MB in bytes
export const MAX_TEXT_LENGTH = 99999;
export const SEARCH_TABS = ["All", "Flows", "Components"];
export const PAGINATION_SIZE = 10;
export const PAGINATION_SIZE = 12;
export const PAGINATION_PAGE = 1;
export const STORE_PAGINATION_SIZE = 12;
export const STORE_PAGINATION_PAGE = 1;
export const PAGINATION_ROWS_COUNT = [10, 20, 50, 100];
export const PAGINATION_ROWS_COUNT = [12, 24, 48, 96];
export const STORE_PAGINATION_ROWS_COUNT = [12, 24, 48, 96];
export const GRADIENT_CLASS =

View file

@ -24,7 +24,7 @@ const HomePage = ({ type }) => {
const [newProjectModal, setNewProjectModal] = useState(false);
const { folderId } = useParams();
const [pageIndex, setPageIndex] = useState(1);
const [pageSize, setPageSize] = useState(10);
const [pageSize, setPageSize] = useState(12);
const [search, setSearch] = useState("");
const handleFileDrop = useFileDrop("flows");
const [flowType, setFlowType] = useState<"flows" | "components">(type);
@ -53,7 +53,7 @@ const HomePage = ({ type }) => {
components: folderData?.folder?.components ?? [],
pagination: {
page: folderData?.flows?.page ?? 1,
size: folderData?.flows?.size ?? 10,
size: folderData?.flows?.size ?? 12,
total: folderData?.flows?.total ?? 0,
pages: folderData?.flows?.pages ?? 0,
},
@ -167,7 +167,7 @@ const HomePage = ({ type }) => {
<PaginatorComponent
pageIndex={data.pagination.page}
pageSize={data.pagination.size}
rowsCount={[10, 20, 50, 100]}
rowsCount={[12, 24, 48, 96]}
totalRowsCount={data.pagination.total}
paginate={handlePageChange}
pages={data.pagination.pages}