Skip to content
Snippets Groups Projects
Commit b18e1a0b authored by esikkala's avatar esikkala
Browse files

Add optional thumb image to perspective config

parent 0aa23597
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,7 @@ import Typography from '@material-ui/core/Typography';
import { withStyles } from '@material-ui/core/styles';
import { Link } from 'react-router-dom';
import { has } from 'lodash';
import thumbImage from '../../img/thumb.png';
import defaultThumbImage from '../../img/thumb.png';
const styles = theme => ({
root: {
......@@ -84,7 +84,9 @@ let Main = props => {
<CardActionArea>
<CardMedia
className={classes.media}
image={thumbImage}
image={has(perspective, 'thumbImage')
? perspective.thumbImage
: defaultThumbImage}
title={perspective.label}
/>
<CardContent className={classes.cardContent}>
......@@ -102,7 +104,9 @@ let Main = props => {
<CardActionArea component={Link} to={`/${perspective.id}/faceted-search`}>
<CardMedia
className={classes.media}
image={thumbImage}
image={has(perspective, 'thumbImage')
? perspective.thumbImage
: defaultThumbImage}
title={perspective.label}
/>
<CardContent className={classes.cardContent}>
......
// import akaLogo from '../../img/logos/funders/aka_en_vaaka_rgb.jpg';
export const perspectiveArr = [
{
id: 'manuscripts',
label: 'Manuscripts',
desc: 'Physical manuscript objects.',
// externalUrl: 'https://seco.cs.aalto.fi/',
// thumbImage: akaLogo, // note: the image has to be imported in this js file
tabs: [
{
id: 'table',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment