feat: SPA pour les pages existantes
This commit is contained in:
parent
668702b1fb
commit
140cc14316
@@ -1,12 +1,19 @@
|
||||
import React from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import { faStar } from '@fortawesome/free-solid-svg-icons';
|
||||
|
||||
export function MangaCard({ manga, onClick }) {
|
||||
export function MangaCard({ manga }) {
|
||||
const navigate = useNavigate();
|
||||
|
||||
const handleClick = () => {
|
||||
navigate(`/manga/${manga.slug}`);
|
||||
};
|
||||
|
||||
return (
|
||||
<div
|
||||
className="bg-white rounded-lg shadow-md overflow-hidden cursor-pointer transition-transform hover:scale-105"
|
||||
onClick={() => onClick?.(manga.slug)}
|
||||
onClick={handleClick}
|
||||
>
|
||||
<div className="relative h-64">
|
||||
<img
|
||||
|
||||
Reference in New Issue
Block a user