Add placeholder image where needed
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import React from 'react';
|
||||
import { Box, Heading } from 'grommet';
|
||||
|
||||
import placeholder from '../assets/placeholder-music.jpg';
|
||||
|
||||
export const Other = ({
|
||||
image,
|
||||
name,
|
||||
@@ -10,6 +12,11 @@ export const Other = ({
|
||||
name: string;
|
||||
handleClick: (name: string) => void;
|
||||
}) => {
|
||||
// Load placeholder image if none provided
|
||||
if (!image) {
|
||||
image = placeholder;
|
||||
}
|
||||
|
||||
return (
|
||||
<Box
|
||||
round='xxsmall'
|
||||
|
||||
Reference in New Issue
Block a user