diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..4fe32ba --- /dev/null +++ b/.eslintignore @@ -0,0 +1 @@ +next.config.js diff --git a/.ncurc.json b/.ncurc.json index bc76b0b..a268e14 100644 --- a/.ncurc.json +++ b/.ncurc.json @@ -1,5 +1,6 @@ { "upgrade": true, "reject": [ + "vitest" ] } diff --git a/next.config.js b/next.config.js index d7e5d23..218392b 100644 --- a/next.config.js +++ b/next.config.js @@ -5,7 +5,18 @@ const nextConfig = { allowedOrigins: ['localhost:3000', 'codex.aulasoftwarelibre.uco.es'], }, }, - output: 'standalone', + images: { + remotePatterns: [ + { + protocol: 'https', + hostname: 'm.media-amazon.com', + }, + { + protocol: 'https', + hostname: 'gravatar.com', + }, + ], + }, } module.exports = nextConfig diff --git a/public/images/logos-pie-white.png b/public/images/logos-pie-white.png new file mode 100644 index 0000000..321eff4 Binary files /dev/null and b/public/images/logos-pie-white.png differ diff --git a/public/images/logos-pie.png b/public/images/logos-pie.png new file mode 100644 index 0000000..287fec1 Binary files /dev/null and b/public/images/logos-pie.png differ diff --git a/src/app/books/[id]/page.tsx b/src/app/books/[id]/page.tsx new file mode 100644 index 0000000..dbd09a1 --- /dev/null +++ b/src/app/books/[id]/page.tsx @@ -0,0 +1,50 @@ +import Image from 'next/image' +import { notFound } from 'next/navigation' + +import BookBreadcrumbs from '@/components/book-breadcrubs/book-breadcrubs' +import BookResponse from '@/core/book/dto/responses/book.response' +import { findBook } from '@/core/book/infrastructure/actions/find-book' + +interface PageParameters { + id: string +} + +export default async function Page({ params }: { params: PageParameters }) { + const book = await findBook(params.id) + + if (!book) { + return notFound() + } + + return ( +
+ +
+ {book.title} +
+
+ {book.title} +
+
+ {book.authors.join(', ')} +
+ +
+
+
+ ) +} + +function LoanBy({ book }: { book: BookResponse }) { + if (!book.loan) { + return null + } + + return
Este libro se encuentra prestado a {book.loan.user.name}
+} diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 39b8be6..0c01a1d 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -3,6 +3,7 @@ import './globals.css' import type { Metadata } from 'next' import { Nunito } from 'next/font/google' +import Footer from '@/components/footer/footer' import Header from '@/components/header' import { Providers } from '@/components/providers' import { findUser } from '@/core/user/infrastructure/actions/find-user' @@ -26,11 +27,16 @@ export default async function RootLayout({ return (
-
{children}
+
+
+ {children} +
+
+