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