import React from "react";
import { Card } from "antd";
import { Link } from "react-router-dom";

export default function JobDetailCardTemplate({
  loading,
  title,
  extraLink,
  ...otherProps
}) {
  let extra;
  if (extraLink) extra = { extra: <Link to={extraLink}>More</Link> };
  return (
    <Card
      size="small"
      className="job-card"
      title={title}
      loading={loading}
      style={{ height: "100%" }}
      {...extra}
    >
      {otherProps.children}
    </Card>
  );
}
