Skip to content

Commit

Permalink
Merge pull request #254 from Pet-projects-CodePET/fix/pagination
Browse files Browse the repository at this point in the history
fix(pages): deleted use memo pagination
  • Loading branch information
danilastepanov authored Aug 5, 2024
2 parents 9d2b176 + 5c51388 commit daf03bd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/pages/projects-page/ui/projects-page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable camelcase */
'use client';
import React, { useState, useMemo, useEffect } from 'react';
import React, { useState, /*useMemo*/ useEffect } from 'react';
import { ProjectCardFull } from '@/widgets/project-card-full';
import { statusOptions } from '@/shared/constants/status-options/status-options';
import { recruitmentStatus } from '@/shared/constants/recruitment-status/recruitment-status';
Expand Down Expand Up @@ -41,9 +41,9 @@ export const Projects = () => {
//console.log('projects', projects);
//console.log('currentPage', currentPage)

const currentData = useMemo(() => {
return projects && projects.results
}, [projects]);
// const currentData = useMemo(() => {
// return projects && projects.results
// }, [projects]);

//console.log('currentData', currentData);

Expand Down Expand Up @@ -169,7 +169,7 @@ export const Projects = () => {
)}
</div>
<div className={styles.projectsContainer}>
{ currentData && currentData.map((project: ProjectCardFullType) => {
{ projects?.results.map((project: ProjectCardFullType) => {
const {
id,
started,
Expand Down

0 comments on commit daf03bd

Please sign in to comment.