From 52115a875a0c429c4b44856a35bb77e3ebadedb6 Mon Sep 17 00:00:00 2001 From: ttpl-rt-217 Date: Mon, 27 Jan 2025 12:36:36 +0530 Subject: [PATCH 1/7] Issue task PS-3327 :Admin UI issue fixed --- src/components/MenuDrawer.tsx | 33 +++++++ src/components/youthNet/BackHeader.tsx | 2 +- src/components/youthNet/Surveys.tsx | 115 ++++++++++++++++++------ src/components/youthNet/tempConfigs.ts | 96 ++++++++++++++++++++ src/pages/youthboard/surveys/index.tsx | 118 +++++++++++++++++++++++++ src/utils/Interfaces.ts | 7 +- 6 files changed, 343 insertions(+), 28 deletions(-) create mode 100644 src/pages/youthboard/surveys/index.tsx diff --git a/src/components/MenuDrawer.tsx b/src/components/MenuDrawer.tsx index 26981ec8..26b43a09 100644 --- a/src/components/MenuDrawer.tsx +++ b/src/components/MenuDrawer.tsx @@ -197,6 +197,7 @@ const MenuDrawer: React.FC = ({ const isBoard = router.pathname.includes('/board-enrollment'); const isSupportRequest = router.pathname.includes('/support-request'); const isVillagesAndYouths = router.pathname.includes('/youthboard/villages'); + const isSurveys = router.pathname.includes('/youthboard/surveys'); return ( = ({ > {t('DASHBOARD.VILLAGES_AND_YOUTH')} + + )} {!tenantName && ( diff --git a/src/components/youthNet/BackHeader.tsx b/src/components/youthNet/BackHeader.tsx index fd733cfc..2558d8e0 100644 --- a/src/components/youthNet/BackHeader.tsx +++ b/src/components/youthNet/BackHeader.tsx @@ -38,7 +38,7 @@ const BackHeader: React.FC = ({ )} - + {headingOne} diff --git a/src/components/youthNet/Surveys.tsx b/src/components/youthNet/Surveys.tsx index 411dc959..c4f8c809 100644 --- a/src/components/youthNet/Surveys.tsx +++ b/src/components/youthNet/Surveys.tsx @@ -4,17 +4,22 @@ import KeyboardArrowRightIcon from '@mui/icons-material/KeyboardArrowRight'; import { SurveysProps } from '@/utils/Interfaces'; import { useTheme } from '@mui/material/styles'; import { useTranslation } from 'next-i18next'; +import PriorityHighIcon from '@mui/icons-material/PriorityHigh'; -function Surveys({ title, date, onClick }: SurveysProps) { +function Surveys({ + title, + date, + onClick, + status, + villages, + actionRequired, + minHeight +}: SurveysProps) { const theme = useTheme(); const { t } = useTranslation(); return ( - - {title} - - - {t('YOUTHNET_DASHBOARD.CLOSED_ON')} {date} - + + + {title} + + {status && ( + + {status} + + )} + + + {villages && ( + + {villages} {t('SURVEYS.VILLAGES')} + + )} + {date && ( + + {t('YOUTHNET_DASHBOARD.CLOSED_ON')} {date} + + )} + + + {actionRequired && ( + + + + + + {actionRequired} + + + )} diff --git a/src/components/youthNet/tempConfigs.ts b/src/components/youthNet/tempConfigs.ts index 2a97b62a..0ad628d0 100644 --- a/src/components/youthNet/tempConfigs.ts +++ b/src/components/youthNet/tempConfigs.ts @@ -245,3 +245,99 @@ export const villageList = [ newRegistrations: 5, }, ]; + + + +// surveys UI data + + +export const surveysData = [ + { + title: "Creativity Mahotsav", + date: "30 Sep, 2024", + details: { + villages: 5, + status: "NEW", + actionRequired: "Assign Volunteers to All Villages" + } + }, + { + title: "Green Initiative Drive", + date: "15 Oct, 2024", + details: { + villages: 8, + status: "IN_PROGRESS", + } + }, + { + title: "Health Awareness Camp", + date: "05 Nov, 2024", + details: { + villages: 12, + status: "COMPLETED", + actionRequired: "Compile Final Report" + } + }, + { + title: "Educational Fair", + date: "20 Sep, 2024", + details: { + villages: 6, + status: "NEW", + } + }, + { + title: "Clean Water Project", + date: "01 Oct, 2024", + details: { + villages: 10, + status: "IN_PROGRESS", + actionRequired: "Monitor Installation Progress" + } + }, + { + title: "Sports Championship", + date: "28 Oct, 2024", + details: { + villages: 7, + status: "NEW", + actionRequired: "Arrange for Venue and Equipment" + } + }, + { + title: "Digital Literacy Program", + date: "10 Nov, 2024", + details: { + villages: 9, + status: "IN_PROGRESS", + actionRequired: "Distribute Devices to Participants" + } + }, + { + title: "Cultural Heritage Week", + date: "25 Sep, 2024", + details: { + villages: 4, + status: "NEW", + actionRequired: "Coordinate with Local Artists" + } + }, + { + title: "Disaster Preparedness Workshop", + date: "12 Oct, 2024", + details: { + villages: 15, + status: "IN_PROGRESS", + + } + }, + { + title: "Youth Leadership Summit", + date: "18 Nov, 2024", + details: { + villages: 11, + status: "NEW", + actionRequired: "Finalize List of Attendees" + } + } +]; diff --git a/src/pages/youthboard/surveys/index.tsx b/src/pages/youthboard/surveys/index.tsx new file mode 100644 index 00000000..f1214cb3 --- /dev/null +++ b/src/pages/youthboard/surveys/index.tsx @@ -0,0 +1,118 @@ +import Header from '@/components/Header'; +import BackHeader from '@/components/youthNet/BackHeader'; +import Surveys from '@/components/youthNet/Surveys'; +import { surveysData } from '@/components/youthNet/tempConfigs'; +import { Box, Grid, Tab, Tabs } from '@mui/material'; +import { useTheme } from '@mui/material/styles'; +import { useTranslation } from 'next-i18next'; +import { serverSideTranslations } from 'next-i18next/serverSideTranslations'; +import { useRouter } from 'next/router'; +import React, { useState } from 'react'; + +const surveys = () => { + const { t } = useTranslation(); + const theme = useTheme(); + const router = useRouter(); + + const [value, setValue] = useState(1); + const [searchInput, setSearchInput] = useState(''); + + const handleChange = (event: React.SyntheticEvent, newValue: number) => { + setValue(newValue); + }; + const handleCampSurvey = (villageNameStringNew: string, title: string) => { + router.push(`/youthboard/campDetails/${villageNameStringNew}${title}`); + }; + + return ( + <> + +
+ + + + + + {value && ( + `1px solid #EBE1D4`, + + '& .MuiTab-root': { + color: theme.palette.warning['A200'], + padding: '0 20px', + flexGrow: 1, + }, + '& .Mui-selected': { + color: theme.palette.warning['A200'], + }, + '& .MuiTabs-indicator': { + display: 'flex', + justifyContent: 'center', + backgroundColor: theme.palette.primary.main, + borderRadius: '100px', + height: '3px', + }, + '& .MuiTabs-scroller': { + overflowX: 'unset !important', + }, + }} + > + + + + )} + + + + + + {value === 1 && ( + + + {surveysData.map((survey, index) => ( + + + + ))} + + + )} + {value === 2 && ( + <> +

Sunny shinde

+ + )} +
+ + + + + ) +} + +export async function getStaticProps({ locale }: any) { + return { + props: { + ...(await serverSideTranslations(locale, ['common'])), + // Will be passed to the page component as props + }, + }; +} + +export default surveys \ No newline at end of file diff --git a/src/utils/Interfaces.ts b/src/utils/Interfaces.ts index aace540d..81bdf4b6 100644 --- a/src/utils/Interfaces.ts +++ b/src/utils/Interfaces.ts @@ -908,7 +908,12 @@ export interface RegistrationModalProps { export interface SurveysProps { title: string; date: string; - onClick: () => void; + villages?: number; + status?: string; + actionRequired?: string; + isActionRequired?: boolean; + onClick?: () => void; + minHeight?:string; } export interface VillageDetailProps { From f080c4666b895855297bb041e1d871a4f3e0ecee Mon Sep 17 00:00:00 2001 From: ttpl-rt-217 Date: Mon, 27 Jan 2025 15:49:29 +0530 Subject: [PATCH 2/7] Issue task PS-3327 :Admin UI issue fixed --- public/locales/en/common.json | 6 +++++ src/components/ManageUser.tsx | 11 ++++++---- src/components/youthNet/VolunteerListCard.tsx | 2 +- src/pages/youthboard/surveys/index.tsx | 22 +++++++++++++++---- 4 files changed, 32 insertions(+), 9 deletions(-) diff --git a/public/locales/en/common.json b/public/locales/en/common.json index 1fb59de3..45cb869f 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -728,5 +728,11 @@ "YOUTHNET_CAMP_DETAILS": { "SUBMISSION": "Submission", "SUMMARY": "Summary" + }, + "SURVEYS": { + "SURVEYS" :"Surveys", + "ACTIVE_SURVEYS" :"Active Surveys", + "PREVIOUS_SURVEYS" :"Previous Surveys", + "VILLAGES":"Villages" } } diff --git a/src/components/ManageUser.tsx b/src/components/ManageUser.tsx index 61fd6ce8..ee063e1f 100644 --- a/src/components/ManageUser.tsx +++ b/src/components/ManageUser.tsx @@ -96,6 +96,8 @@ const ManageUser: React.FC = ({ const [centers, setCenters] = useState([]); const [centerList, setCenterList] = useState([]); const [page, setPage] = useState(1); + + const [offset, setOffSet] = useState(1); const [infinitePage, setInfinitePage] = useState(1); const [infiniteData, setInfiniteData] = useState(users || []); @@ -151,7 +153,7 @@ const ManageUser: React.FC = ({ if (cohortId) { const limit = 10; - // const page = page; + const page = offset; const filters = { states: store.stateCode, districts: store.districtCode, @@ -222,7 +224,7 @@ const ManageUser: React.FC = ({ setUsers(extractedData); // setLoading(false); if (isMobile) { - setInfiniteData([...infiniteData, ...extractedData]); + setInfiniteData([...infiniteData, ...extractedData]); } else { setFilteredUsers(extractedData); setInfiniteData(extractedData); @@ -537,14 +539,14 @@ const ManageUser: React.FC = ({ ); }; const PAGINATION_CONFIG = { - ITEMS_PER_PAGE: 12, + ITEMS_PER_PAGE: 10, INFINITE_SCROLL_INCREMENT: 10 }; const fetchData = async () => { try { - setInfinitePage((prev) => prev + PAGINATION_CONFIG.INFINITE_SCROLL_INCREMENT); + setInfinitePage((prev) => prev + PAGINATION_CONFIG.INFINITE_SCROLL_INCREMENT); } catch (error) { console.error('Error fetching more data:', error); showToastMessage(t('COMMON.SOMETHING_WENT_WRONG'), 'error'); @@ -552,6 +554,7 @@ const ManageUser: React.FC = ({ } const handlePageChange = (newPage: number) => { setPage(newPage); + setOffSet((newPage-1)*10) }; return ( diff --git a/src/components/youthNet/VolunteerListCard.tsx b/src/components/youthNet/VolunteerListCard.tsx index 844aff28..5599392e 100644 --- a/src/components/youthNet/VolunteerListCard.tsx +++ b/src/components/youthNet/VolunteerListCard.tsx @@ -10,7 +10,7 @@ interface CardProps { entries: number; volunteerCount: number; actionLabel: string; - onActionClick: () => void; + onActionClick?: () => void; } const VolunteerListCard: React.FC = ({ diff --git a/src/pages/youthboard/surveys/index.tsx b/src/pages/youthboard/surveys/index.tsx index f1214cb3..6ee0cc53 100644 --- a/src/pages/youthboard/surveys/index.tsx +++ b/src/pages/youthboard/surveys/index.tsx @@ -1,7 +1,9 @@ +import NoDataFound from '@/components/common/NoDataFound'; import Header from '@/components/Header'; import BackHeader from '@/components/youthNet/BackHeader'; import Surveys from '@/components/youthNet/Surveys'; -import { surveysData } from '@/components/youthNet/tempConfigs'; +import { surveysData, volunteerData } from '@/components/youthNet/tempConfigs'; +import VolunteerListCard from '@/components/youthNet/VolunteerListCard'; import { Box, Grid, Tab, Tabs } from '@mui/material'; import { useTheme } from '@mui/material/styles'; import { useTranslation } from 'next-i18next'; @@ -94,9 +96,21 @@ const surveys = () => { )} {value === 2 && ( - <> -

Sunny shinde

- + + {volunteerData?.length > 0 ? ( + volunteerData?.map((data) => ( + + )) + ) : ( + + )} + )} From a5cfa61716304a9984457edd5b36e3289f9bd886 Mon Sep 17 00:00:00 2001 From: ttpl-rt-217 Date: Mon, 27 Jan 2025 16:03:11 +0530 Subject: [PATCH 3/7] Issue task PS-3327 :Admin UI issue fixed --- src/components/CustomPagination.tsx | 34 ++++++++++++++--------------- src/components/ManageUser.tsx | 6 ++--- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/components/CustomPagination.tsx b/src/components/CustomPagination.tsx index a1a4f1ca..8970840d 100644 --- a/src/components/CustomPagination.tsx +++ b/src/components/CustomPagination.tsx @@ -30,23 +30,23 @@ const CustomPagination: React.FC = ({ const isMobile = useMediaQuery(theme.breakpoints.down('md')); const { t } = useTranslation(); - if (isMobile) { - return ( - { - console.warn('fetchMoreData callback is required for infinite scroll'); - })} - hasMore={hasMore} - loader={

{t('COMMON.LOADING')}...

} - // endMessage={ - //

You have seen all data!

- // } - > - <> -
- ); - } + // if (isMobile) { + // return ( + // { + // console.warn('fetchMoreData callback is required for infinite scroll'); + // })} + // hasMore={hasMore} + // loader={

{t('COMMON.LOADING')}...

} + // // endMessage={ + // //

You have seen all data!

+ // // } + // > + // <> + //
+ // ); + // } return ( diff --git a/src/components/ManageUser.tsx b/src/components/ManageUser.tsx index ee063e1f..a38d10ce 100644 --- a/src/components/ManageUser.tsx +++ b/src/components/ManageUser.tsx @@ -141,9 +141,9 @@ const ManageUser: React.FC = ({ useEffect(() => { const getFacilitator = async () => { - if (!isMobile) { - setLoading(true); - } + // if (!isMobile) { + // } + setLoading(true); try { const cohortId = cohortData .map((block: any) => { From 59dd9411d96a309d754c5a721e6454620897c33c Mon Sep 17 00:00:00 2001 From: ttpl-rt-217 Date: Mon, 27 Jan 2025 16:18:52 +0530 Subject: [PATCH 4/7] Issue task PS-3327 :Admin UI issue fixed --- src/components/CohortFacilitatorList.tsx | 37 ++++++++++++++---------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/src/components/CohortFacilitatorList.tsx b/src/components/CohortFacilitatorList.tsx index 0b2d9ae1..c1d77112 100644 --- a/src/components/CohortFacilitatorList.tsx +++ b/src/components/CohortFacilitatorList.tsx @@ -45,6 +45,8 @@ const CohortLearnerList: React.FC = ({ const [page, setPage] = useState(0); + const [offset, setOffset] = useState(0); + const [infinitePage, setInfinitePage] = useState(1); const [infiniteData, setInfiniteData] = useState([]); const [totalCount, setTotalCount] = useState(0); @@ -57,12 +59,14 @@ const CohortLearnerList: React.FC = ({ useEffect(() => { const getCohortMemberList = async () => { - if (!isMobile) { - setLoading(true); - } + // if (!isMobile) { + // } + setLoading(true); try { if (cohortId) { const filters = { cohortId: cohortId }; + const limit = 10 + const page=offset const response = await getMyCohortFacilitatorList({ limit, page, @@ -132,18 +136,19 @@ const CohortLearnerList: React.FC = ({ INFINITE_SCROLL_INCREMENT: 10, }; - const fetchData = async () => { - try { - setInfinitePage( - (prev) => prev + PAGINATION_CONFIG.INFINITE_SCROLL_INCREMENT - ); - } catch (error) { - console.error('Error fetching more data:', error); - showToastMessage(t('COMMON.SOMETHING_WENT_WRONG'), 'error'); - } - }; + // const fetchData = async () => { + // try { + // setInfinitePage( + // (prev) => prev + PAGINATION_CONFIG.INFINITE_SCROLL_INCREMENT + // ); + // } catch (error) { + // console.error('Error fetching more data:', error); + // showToastMessage(t('COMMON.SOMETHING_WENT_WRONG'), 'error'); + // } + // }; const handlePageChange = (newPage: number) => { - setPage(newPage); + setPage(newPage-1); + setOffset((newPage-1)*10) }; @@ -208,8 +213,8 @@ const CohortLearnerList: React.FC = ({ count={Math.ceil(totalCount / PAGINATION_CONFIG.ITEMS_PER_PAGE)} page={page + 1} onPageChange={handlePageChange} - fetchMoreData={fetchData} - hasMore={infinitePage * limit < totalCount} + // fetchMoreData={fetchData} + hasMore={infinitePage * 1 < totalCount} items={(infiniteData || []).map((user: UserDataProps) => ( ))} From cf532815aa71749d149a1e923f9f3f5f965c2a96 Mon Sep 17 00:00:00 2001 From: ttpl-rt-217 Date: Mon, 27 Jan 2025 19:15:26 +0530 Subject: [PATCH 5/7] Issue task PS-3327 :Admin UI issue fixed --- src/components/CohortFacilitatorList.tsx | 12 ++--- src/components/youthNet/Surveys.tsx | 2 +- src/components/youthNet/VolunteerListCard.tsx | 2 +- src/pages/youthboard/surveys/index.tsx | 48 +++++++++---------- src/utils/app.constant.ts | 3 +- 5 files changed, 32 insertions(+), 35 deletions(-) diff --git a/src/components/CohortFacilitatorList.tsx b/src/components/CohortFacilitatorList.tsx index c1d77112..9ce0469a 100644 --- a/src/components/CohortFacilitatorList.tsx +++ b/src/components/CohortFacilitatorList.tsx @@ -1,7 +1,7 @@ import LearnersListItem from '@/components/LearnersListItem'; import { getMyCohortFacilitatorList } from '@/services/MyClassDetailsService'; import useStore from '@/store/store'; -import { Status, limit } from '@/utils/app.constant'; +import { Status, pagesLimit } from '@/utils/app.constant'; import { toPascalCase } from '@/utils/Helper'; @@ -65,7 +65,7 @@ const CohortLearnerList: React.FC = ({ try { if (cohortId) { const filters = { cohortId: cohortId }; - const limit = 10 + const limit = pagesLimit const page=offset const response = await getMyCohortFacilitatorList({ limit, @@ -132,8 +132,8 @@ const CohortLearnerList: React.FC = ({ }; const PAGINATION_CONFIG = { - ITEMS_PER_PAGE: 10, - INFINITE_SCROLL_INCREMENT: 10, + ITEMS_PER_PAGE: pagesLimit, + INFINITE_SCROLL_INCREMENT: pagesLimit, }; // const fetchData = async () => { @@ -148,7 +148,7 @@ const CohortLearnerList: React.FC = ({ // }; const handlePageChange = (newPage: number) => { setPage(newPage-1); - setOffset((newPage-1)*10) + setOffset((newPage - 1) * pagesLimit) }; @@ -208,7 +208,7 @@ const CohortLearnerList: React.FC = ({ }} > { - (isMobile ? infiniteData.length > 10 : (filteredData && filteredData?.length > 10)) && ( + (isMobile ? infiniteData.length > pagesLimit : (filteredData && filteredData?.length > pagesLimit)) && ( = ({ component="button" variant="body2" color="primary" - onClick={onActionClick} + onClick={onActionClick || (() => { })} sx={{ fontWeight: '500', color: '#0D599E', diff --git a/src/pages/youthboard/surveys/index.tsx b/src/pages/youthboard/surveys/index.tsx index 6ee0cc53..d35f405d 100644 --- a/src/pages/youthboard/surveys/index.tsx +++ b/src/pages/youthboard/surveys/index.tsx @@ -26,6 +26,10 @@ const surveys = () => { router.push(`/youthboard/campDetails/${villageNameStringNew}${title}`); }; + const handleAddVolunteers = () => { + router.push('/youthboard/volunteerList'); + }; + return ( <> @@ -79,37 +83,29 @@ const surveys = () => { background: '#FBF4E4', }}> - {surveysData.map((survey, index) => ( - - - - ))} + {surveysData && surveysData.length > 0 ? ( + surveysData.map((survey , index) => ( + + + + )) + ) : ( + + )} )} {value === 2 && ( - {volunteerData?.length > 0 ? ( - volunteerData?.map((data) => ( - - )) - ) : ( - - )} + coming soon )} diff --git a/src/utils/app.constant.ts b/src/utils/app.constant.ts index 1cec4baa..95b243c5 100644 --- a/src/utils/app.constant.ts +++ b/src/utils/app.constant.ts @@ -23,8 +23,9 @@ import bgunit from '../assets/images/bgUnit.png'; export const limit: number = 200; export const refetchInterval: number = 5 * 60 * 1000; // 5 min export const gcTime: number = 10 * 60 * 1000; // 10 Min +export const pagesLimit: number = 10; -export const labelsToExtractForMiniProfile = [ +export const labelsToExtractForMiniProfile = [ 'AGE', 'GENDER', 'LEARNERS_PRIMARY_WORK', From 6f32741357bd6a140efefd1772e4efa3d0bce0bb Mon Sep 17 00:00:00 2001 From: ttpl-rt-217 Date: Mon, 27 Jan 2025 23:28:15 +0530 Subject: [PATCH 6/7] Issue task PS-3327 :Admin UI issue fixed --- src/components/CohortFacilitatorList.tsx | 2 +- src/pages/youthboard/surveys/index.tsx | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/components/CohortFacilitatorList.tsx b/src/components/CohortFacilitatorList.tsx index 9ce0469a..c8eaf4b7 100644 --- a/src/components/CohortFacilitatorList.tsx +++ b/src/components/CohortFacilitatorList.tsx @@ -214,7 +214,7 @@ const CohortLearnerList: React.FC = ({ page={page + 1} onPageChange={handlePageChange} // fetchMoreData={fetchData} - hasMore={infinitePage * 1 < totalCount} + hasMore={infinitePage * pagesLimit < totalCount} items={(infiniteData || []).map((user: UserDataProps) => ( ))} diff --git a/src/pages/youthboard/surveys/index.tsx b/src/pages/youthboard/surveys/index.tsx index d35f405d..2ca537f2 100644 --- a/src/pages/youthboard/surveys/index.tsx +++ b/src/pages/youthboard/surveys/index.tsx @@ -2,8 +2,7 @@ import NoDataFound from '@/components/common/NoDataFound'; import Header from '@/components/Header'; import BackHeader from '@/components/youthNet/BackHeader'; import Surveys from '@/components/youthNet/Surveys'; -import { surveysData, volunteerData } from '@/components/youthNet/tempConfigs'; -import VolunteerListCard from '@/components/youthNet/VolunteerListCard'; +import { surveysData } from '@/components/youthNet/tempConfigs'; import { Box, Grid, Tab, Tabs } from '@mui/material'; import { useTheme } from '@mui/material/styles'; import { useTranslation } from 'next-i18next'; @@ -11,7 +10,7 @@ import { serverSideTranslations } from 'next-i18next/serverSideTranslations'; import { useRouter } from 'next/router'; import React, { useState } from 'react'; -const surveys = () => { +const Survey = () => { const { t } = useTranslation(); const theme = useTheme(); const router = useRouter(); @@ -125,4 +124,4 @@ export async function getStaticProps({ locale }: any) { }; } -export default surveys \ No newline at end of file +export default Survey \ No newline at end of file From 41f33a18aa49f7183260dfd0eb2e2cb7cc4eec0e Mon Sep 17 00:00:00 2001 From: ttpl-rt-217 Date: Tue, 28 Jan 2025 00:02:28 +0530 Subject: [PATCH 7/7] Issue task PS-3327 :Admin UI issue fixed --- src/components/ManageUser.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ManageUser.tsx b/src/components/ManageUser.tsx index a38d10ce..9566239b 100644 --- a/src/components/ManageUser.tsx +++ b/src/components/ManageUser.tsx @@ -97,7 +97,7 @@ const ManageUser: React.FC = ({ const [centerList, setCenterList] = useState([]); const [page, setPage] = useState(1); - const [offset, setOffSet] = useState(1); + const [offset, setOffSet] = useState(0); const [infinitePage, setInfinitePage] = useState(1); const [infiniteData, setInfiniteData] = useState(users || []);