'use client'; import React from 'react'; import { Button } from '@/components/ui'; interface ShareButtonProps { title: string; text: string; url: string; locale: string; } export default function ShareButton({ title, text, url, locale }: ShareButtonProps) { const handleShare = async () => { if (navigator.share) { try { await navigator.share({ title, text, url, }); } catch (error) { console.error('Error sharing:', error); } } else { // Fallback to copy link try { await navigator.clipboard.writeText(url); alert(locale === 'de' ? 'Link kopiert!' : 'Link copied!'); } catch (error) { console.error('Error copying link:', error); } } }; return ( ); }