feat: SPA pour les pages existantes

This commit is contained in:
ext.jeremy.guillot@maxicoffee.domains
2025-02-17 14:50:36 +01:00
parent 668702b1fb
commit 140cc14316
11 changed files with 331 additions and 164 deletions

View File

@@ -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