правка отображения сторонних и загруженных изображений
This commit is contained in:
@@ -63,7 +63,7 @@ export function Cocktail({row, handleFavourite, handleChangeRating, handleSelect
|
|||||||
alt={row.name}
|
alt={row.name}
|
||||||
height="300"
|
height="300"
|
||||||
|
|
||||||
image={row.image.startsWith("/assets") ? row.image : (row.image + "/preview")}
|
image={row.image.includes("thecocktaildb") ? (row.image + "/preview") : row.image}
|
||||||
/>
|
/>
|
||||||
{renderFavouriteBadge(handleFavourite, row)}
|
{renderFavouriteBadge(handleFavourite, row)}
|
||||||
{renderRating(handleChangeRating, row)}
|
{renderRating(handleChangeRating, row)}
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ export function CocktailInfoModal({row}) {
|
|||||||
</DialogTitle>
|
</DialogTitle>
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
<CardMedia
|
<CardMedia
|
||||||
image={`${cocktail.image}/preview`}
|
image={row.image.includes("thecocktaildb") ? (row.image + "/preview") : row.image}
|
||||||
sx={{
|
sx={{
|
||||||
loading: "eager",
|
loading: "eager",
|
||||||
borderRadius: 2
|
borderRadius: 2
|
||||||
|
|||||||
Reference in New Issue
Block a user