diff --git a/Makefile b/Makefile index d002e57..2129aac 100644 --- a/Makefile +++ b/Makefile @@ -27,6 +27,9 @@ help: ## Outputs this help screen build: ## Builds the Docker images @$(DOCKER_COMP) build --pull --no-cache +up: ## Start the docker hub + @$(DOCKER_COMP) up -d + start: ## Start the docker hub in detached mode (no logs) @$(DOCKER_COMP) up --pull always -d --wait diff --git a/assets/react/app/domain/manga.js b/assets/react/app/domain/manga.js index 7b82ed5..f3564d1 100644 --- a/assets/react/app/domain/manga.js +++ b/assets/react/app/domain/manga.js @@ -11,7 +11,8 @@ export class Manga { genres, status, rating, - description = '' + description = '', + createdAt = null ) { this.id = id; this.title = title; @@ -23,6 +24,7 @@ export class Manga { this.status = status; this.rating = rating; this.description = description; + this.createdAt = createdAt; } } @@ -49,7 +51,8 @@ export class MangaDetail extends Manga { manga.genres, manga.status, manga.rating, - manga.description + manga.description, + manga.createdAt ); this.chapters = this.organizeChaptersByVolume(chapters); } diff --git a/assets/react/app/infrastructure/api/apiMangaRepository.js b/assets/react/app/infrastructure/api/apiMangaRepository.js index 9ac0973..1c27aca 100644 --- a/assets/react/app/infrastructure/api/apiMangaRepository.js +++ b/assets/react/app/infrastructure/api/apiMangaRepository.js @@ -23,7 +23,9 @@ export class ApiMangaRepository { item.publicationYear, item.genres, item.status, - item.rating + item.rating, + item.description, + item.createdAt )); return new MangaCollection( @@ -55,7 +57,8 @@ export class ApiMangaRepository { item.genres, item.status, item.rating, - item.description + item.description, + item.createdAt )); } catch (error) { console.error('Error searching mangas:', error); @@ -90,7 +93,8 @@ export class ApiMangaRepository { genres: mangaData.genres, status: mangaData.status, rating: mangaData.rating, - description: mangaData.description + description: mangaData.description, + createdAt: mangaData.createdAt }, chapters); } catch (error) { console.error('Error fetching manga details:', error); diff --git a/assets/react/app/presentation/components/MangaCard.jsx b/assets/react/app/presentation/components/MangaCard.jsx index a3aabe1..f993e5c 100644 --- a/assets/react/app/presentation/components/MangaCard.jsx +++ b/assets/react/app/presentation/components/MangaCard.jsx @@ -1,7 +1,5 @@ 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 }) { const navigate = useNavigate(); @@ -10,39 +8,34 @@ export function MangaCard({ manga }) { navigate(`/manga/${manga.slug}`); }; + const formatDate = (dateString) => { + const date = new Date(dateString); + return date.toLocaleDateString('en-US', { + month: 'short', + day: 'numeric', + year: 'numeric' + }); + }; + return (
By {manga.author}
-