Add placeholder image where needed
This commit is contained in:
@@ -1,7 +1,14 @@
|
||||
import React from 'react';
|
||||
import { Box, Heading, Image } from 'grommet';
|
||||
|
||||
import placeholder from '../assets/placeholder-music.jpg';
|
||||
|
||||
export const Album = ({ image, name }: { image: string; name: string }) => {
|
||||
// Load placeholder image if none provided
|
||||
if (!image) {
|
||||
image = placeholder;
|
||||
}
|
||||
|
||||
return (
|
||||
<Box round='xxsmall' elevation='small' overflow='hidden'>
|
||||
<Box height='300px'>
|
||||
|
||||
Reference in New Issue
Block a user