import React from "react";
import { Card, Col, Row } from "antd";
import { useNavigate } from "react-router";

const HomepageCard = ({ title, url }) => {
  const navigate = useNavigate();
  return (
    <Row
      gutter={16}
      className="p-2"
      onClick={() => {
        navigate(url);
      }}
    >
      <Col span={12}>
        <Card title="" className="shadow" bordered={false}>
          {title}
        </Card>
      </Col>
    </Row>
  );
};
export default HomepageCard;
