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
import { iProfile } from "@/services/data" // import the data types | |
import axios from "axios" | |
import { useCallback, useEffect, useState } from "react" | |
// if you are using Mockup Data | |
// We don't know or have access to the data in this hook, so we are passing `data` as a placeholder argument | |
// We also don't know the limit yet, we simply pass `limit` as argument | |
export const useMockPaginate = (data: iProfile[], limit: number) => { |
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
export interface iProfile { | |
name: string; | |
email: string; | |
photo: string; | |
username: string; | |
role: "Frontend Developer" | "Backend Developer" | "Fullstack Developer"; | |
} | |
export const data: iProfile[] = []; |
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
import React, { useEffect, useState } from "react"; | |
import { Box } from "@mui/material"; | |
// Import these components correctly depending on your structure | |
import TableUI from "@/components/TableUI/TableUI"; | |
import { Columns } from "./Column"; | |
import {DummyData} from "./dummydata" |