Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix #546 for image css breaking issue #589

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/components/Cards/MovieCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ const MovieCard = (props) => {

return (
<>
<div className={`shadow flex my-4 p-3 group`} key={props.movie.id}>
<div className={`shadow flex my-4 p-3 group `} key={props.movie.id}>
<div
className={`${styles.MovieCard} relative flex justify-start items-end p-4 duration-200 rounded-[6px]`}
className={`${styles.MovieCard} relative flex justify-start items-end p-4 xs:p-0 duration-200 rounded-[6px]`}
alt="movie poster"
style={{
backgroundImage: `url(https://image.tmdb.org/t/p/original/${props.movie.poster_path}), linear-gradient(0deg, #0D1117 0%, #161B22 10%, #0D1117 20%, transparent 100%)`,
Expand Down Expand Up @@ -107,10 +107,11 @@ const MovieCard = (props) => {
<div className="w-full opacity-90 text-white text-md font-medium mt-2 ">
<p className="mb-2">{props.title}</p>
</div>
<div className="flex mb-[-38px]">
<div className=" mb-[-38px] flex xs:mb-[-20px]">
<CircleRating rating={props.movie.vote_average.toFixed(1)} />
<span
className="pl-[20px] right-3date text-dimWhite font-normal text-xs"
className="right-3date text-dimWhite font-normal text-xs xs:text-[10px]"

>
{dayjs(props.movie.release_date).format("MMM D, YYYY")}
</span>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Movies.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function Movies(props) {
return e
})
}
return (
return (
<>
{!initialLoading ? (
<div className='bg-gray-200 text-gray-900 dark:bg-primary dark:text-white'>
Expand Down
3 changes: 0 additions & 3 deletions src/pages/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ const Home = () => {
setInitialLoading(true);
try {
const response = await fetchData("get-all-genres", 1);
// console.log('response:', response.data)
if (response.success) {
setGenreMovie(response.data.genres);
setInitialLoading(false);
Expand All @@ -35,11 +34,9 @@ const Home = () => {
console.log(error);
}
};

useEffect(() => {
uploadMovie();
}, []);

useEffect(() => {
uploadTv();
}, []);
Expand Down
3 changes: 3 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ module.exports = {
},
}
},
screens: {
'xs': '400px',
},
animation: {
'arrow-updown': 'updown 3s linear infinite',
},
Expand Down