Width of thumbnail is consistent no matter what content sits inside

This commit is contained in:
austinkelsay 2024-03-19 11:11:23 -05:00
parent b6797311d5
commit a8fd29c4ed
2 changed files with 2 additions and 2 deletions

View File

@ -76,7 +76,7 @@ export default function CoursesCarousel() {
const { width, height } = calculateImageDimensions();
return (
<div style={{width: width < 768 ? "auto" : width}} onClick={() => router.push(`/details/${course.id}`)} className="flex flex-col items-center mx-auto px-4 cursor-pointer mt-8 rounded-md shadow-lg">
<div style={{maxWidth: width}} className="max-tab:h-auto max-mob:h-auto">
<div style={{maxWidth: width, minWidth: width}} className="max-tab:h-auto max-mob:h-auto">
<Image
alt="resource thumbnail"
src={returnImageProxy(course.image)}

View File

@ -74,7 +74,7 @@ export default function WorkshopsCarousel() {
const { width, height } = calculateImageDimensions();
return (
<div style={{width: width < 768 ? "auto" : width}} onClick={() => router.push(`/details/${workshop.id}`)} className="flex flex-col items-center mx-auto px-4 cursor-pointer mt-8 rounded-md shadow-lg">
<div style={{maxWidth: width}} className="max-tab:h-auto max-mob:h-auto">
<div style={{maxWidth: width, minWidth: width}} className="max-tab:h-auto max-mob:h-auto">
<Image
alt="resource thumbnail"
src={returnImageProxy(workshop.image)}