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"
    >
      <Col span={24}>
        <Card 
          onClick={() => {
            navigate(url);
          }}
          title="" className="shadow" 
          bordered={true}
          style={{with:'100%'}}
        >
          {title}
        </Card>
      </Col>
    </Row>
  );
};
export default HomepageCard;
