fix loop
This commit is contained in:
@@ -29,7 +29,6 @@ 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();
|
||||
@@ -58,10 +57,7 @@ export default function StoryCard({
|
||||
|
||||
if (viewMode === 'list') {
|
||||
return (
|
||||
<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="theme-card theme-shadow rounded-lg p-4 hover:shadow-lg transition-shadow">
|
||||
<div className="flex gap-4">
|
||||
{/* Cover Image */}
|
||||
<div className="flex-shrink-0">
|
||||
@@ -176,10 +172,7 @@ export default function StoryCard({
|
||||
|
||||
// Grid view
|
||||
return (
|
||||
<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)}
|
||||
>
|
||||
<div className="theme-card theme-shadow rounded-lg overflow-hidden hover:shadow-lg transition-shadow group">
|
||||
{/* Cover Image */}
|
||||
<Link href={`/stories/${story.id}`}>
|
||||
<div className="aspect-[3/4] bg-gray-200 dark:bg-gray-700 overflow-hidden">
|
||||
|
||||
Reference in New Issue
Block a user