Skip to content
Snippets Groups Projects
Commit 0cdcc7c6 authored by Cliff Li's avatar Cliff Li
Browse files

Minor fix

parent 7992dde8
No related branches found
No related tags found
1 merge request!48Frontpage
......@@ -7,7 +7,7 @@ const date = `${new Date().toISOString().split('.')[0]}Z`;
// Render the frontpage cards, with href and imageurl
const renderCards = item => {
const { title, href } = item;
const imageurl = item.img_infoscreen ? `${apiUrl}${item.img_infoscreen.file}` : null;
const imageurl = item.img_infoscreen ? `${apiUrl}${item.img_infoscreen.file}` : '';
return m(
'div.frontpage-card',
{ style: `background-image: url(${imageurl})` },
......@@ -18,7 +18,7 @@ const renderCards = item => {
// Render the Hot Cards, with link and imageurl
const renderHotCards = (item, index) => {
const { title, href } = item;
const imageurl = item.img_infoscreen ? `${apiUrl}${item.img_infoscreen.file}` : null;
const imageurl = item.img_infoscreen ? `${apiUrl}${item.img_infoscreen.file}` : '';
if (index === 0) {
return m(
'div.hot-first-card',
......
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