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"
      style={{ width: 290 }}
      className="job-card"
      title={title}
      loading={loading}
      {...extra}
    >
      {otherProps.children}
    </Card>
  );
}
