This commit is contained in:
Stefan Hardegger
2025-08-18 10:32:02 +02:00
parent 65f1c6edc7
commit e952241e3c
2 changed files with 22 additions and 3 deletions

View File

@@ -29,6 +29,8 @@ export default function StoryCard({
const [updating, setUpdating] = useState(false);
const handleRatingClick = async (e: React.MouseEvent, newRating: number) => {
console.log('Rating click:', newRating, 'for story:', story.title);
// Prevent default and stop propagation to avoid triggering navigation
e.preventDefault();
e.stopPropagation();
@@ -56,7 +58,10 @@ export default function StoryCard({
if (viewMode === 'list') {
return (
<div className="theme-card theme-shadow rounded-lg p-4 hover:shadow-lg transition-shadow">
<div
className="theme-card theme-shadow rounded-lg p-4 hover:shadow-lg transition-shadow"
onClick={(e) => console.log('Story card clicked (list view):', story.title, 'Target:', e.target)}
>
<div className="flex gap-4">
{/* Cover Image */}
<div className="flex-shrink-0">
@@ -171,7 +176,10 @@ export default function StoryCard({
// Grid view
return (
<div className="theme-card theme-shadow rounded-lg overflow-hidden hover:shadow-lg transition-shadow group">
<div
className="theme-card theme-shadow rounded-lg overflow-hidden hover:shadow-lg transition-shadow group"
onClick={(e) => console.log('Story card clicked (grid view):', story.title, 'Target:', e.target)}
>
{/* Cover Image */}
<Link href={`/stories/${story.id}`}>
<div className="aspect-[3/4] bg-gray-200 dark:bg-gray-700 overflow-hidden">