"use client";

import { QRCodeSVG } from "qrcode.react";

interface QRCodeDisplayProps {
  url: string;
  size?: number;
}

export default function QRCodeDisplay({ url, size = 200 }: QRCodeDisplayProps) {
  return (
    <div className="flex flex-col items-center gap-4 p-4 bg-white rounded-2xl border border-gray-200">
      <QRCodeSVG value={url} size={size} level="H" />
      <p className="text-xs text-gray-600 text-center break-all max-w-xs">
        {url}
      </p>
    </div>
  );
}

