// react-routers components
import Link from "next/link"
// @mui material components
import Card from "@mui/material/Card"
// ThreeD Garden components
import MDBox from "~/components/mui/MDBox"
import MDTypography from "~/components/mui/MDTypography"
import MDAvatar from "~/components/mui/MDAvatar"
import MDButton from "~/components/mui/MDButton"
// Declaring props types for ProfilesList
interface Props {
title: string
profiles: {
image: string
name: string
description: string
action: {
type: "external" | "internal"
route: string
color:
| "primary"
| "secondary"
| "info"
| "success"
| "warning"
| "error"
| "light"
| "dark"
label: string
}
}[]
shadow?: boolean
[key: string]: any
}
function ProfilesList({ title, profiles, shadow }: Props): JSX.Element {
const renderProfiles = profiles.map(
({ image, name, description, action }) => (
{name}
{description}
{action.type === "internal" ? (
{action.label}
) : (
{action.label}
)}
)
)
return (
{title}
{renderProfiles}
)
}
// Declaring defualt props for ProfilesList
ProfilesList.defaultProps = {
shadow: true,
}
export default ProfilesList