Refactor homepage layout and add new "Odkrywaj" page: remove "O mnie" page, update Navbar links, and implement new page for displaying trending movies with a Hero component for enhanced user experience.
This commit is contained in:
@@ -29,7 +29,15 @@ export const MovieCard: FC<Props> = ({
|
||||
deleteMovie: deleteMovieFromStore,
|
||||
updateMovie: updateMovieInStore,
|
||||
} = useGlobalStore();
|
||||
const { id, title, overview, popularity, release_date, poster_path } = movie;
|
||||
const {
|
||||
id,
|
||||
title,
|
||||
overview,
|
||||
popularity,
|
||||
release_date,
|
||||
poster_path,
|
||||
vote_average,
|
||||
} = movie;
|
||||
const alreadyInStore = movies.find((m) => m.id === id);
|
||||
|
||||
const isReleased = new Date(release_date) < new Date();
|
||||
@@ -147,6 +155,13 @@ export const MovieCard: FC<Props> = ({
|
||||
<div className="p-4">
|
||||
<div className="flex justify-between">
|
||||
<h2 className="text-xl leading-[1.1] font-bold">{title}</h2>
|
||||
|
||||
{!!vote_average && (
|
||||
<p className="flex items-center gap-1 text-sm">
|
||||
<span className="text-yellow-400">★</span>
|
||||
<span>{vote_average.toFixed(1)}/10</span>
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
<p
|
||||
className={`text-sm mt-2 flex items-center gap-1 leading-[1.1] ${
|
||||
|
||||
Reference in New Issue
Block a user