From a63c11420225e0ebcb21ca7a82b3a4894affee49 Mon Sep 17 00:00:00 2001 From: Akshata Katwal Date: Fri, 12 Jul 2024 17:14:48 +0530 Subject: [PATCH] update PR --- src/pages/learners.tsx | 10 ++-------- src/services/userList.ts | 14 -------------- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/src/pages/learners.tsx b/src/pages/learners.tsx index 6b2a2a9c..81d898e0 100644 --- a/src/pages/learners.tsx +++ b/src/pages/learners.tsx @@ -9,8 +9,6 @@ import { useTranslation } from "next-i18next"; import Pagination from "@mui/material/Pagination"; import { SelectChangeEvent } from "@mui/material/Select"; import PageSizeSelector from "@/components/PageSelector"; -import IconButton from '@mui/material/IconButton'; -import MoreVertIcon from '@mui/icons-material/MoreVert'; type UserDetails = { userId: any; @@ -50,7 +48,7 @@ const columns = [ { key: "actions", title: "Actions", - dataType: DataType.Object, + dataType: DataType.String, }, ]; @@ -143,11 +141,7 @@ const Learners: React.FC = () => { return { ...user, centers: cohortNames, - actions: ( - - - - ), + }; }) ); diff --git a/src/services/userList.ts b/src/services/userList.ts index 1d753e69..d40bbc0a 100644 --- a/src/services/userList.ts +++ b/src/services/userList.ts @@ -1,5 +1,4 @@ import { post } from "./RestClient"; -import { get } from "./RestClient"; export interface userListParam { limit: number; @@ -30,17 +29,4 @@ export interface userListParam { }; - export const getCohortList = async ( - userId: string | string[], - - ): Promise => { - const apiUrl: string = `${process.env.NEXT_PUBLIC_BASE_URL}/cohort/mycohorts/${userId}`; - try { - const response = await get(apiUrl); - return response?.data; - } catch (error) { - console.error('error in fetching user details', error); - return error; - } - }; \ No newline at end of file