chore: update website for preview links (#2085)
* chore: update website for preview links * fix formatting
This commit is contained in:
@ -2,13 +2,12 @@ import React from 'react';
|
||||
import moment from 'moment';
|
||||
import Markdownify from '../components/markdownify';
|
||||
|
||||
const Release = ({ version, versionPrevious, date, description }) => {
|
||||
console.log(version, versionPrevious);
|
||||
const Release = ({ version, versionPrevious, date, description, url }) => {
|
||||
const displayDate = moment(date).format('MMMM D, YYYY');
|
||||
const url = `https://github.com/netlify/netlify-cms/compare/${versionPrevious}...${version}`;
|
||||
const defaultUrl = `https://github.com/netlify/netlify-cms/compare/${versionPrevious}...${version}`;
|
||||
|
||||
return (
|
||||
<a href={url} key={version}>
|
||||
<a href={url || defaultUrl} key={version}>
|
||||
<li>
|
||||
<div className="update-metadata">
|
||||
<span className="update-version">{version}</span>
|
||||
|
@ -74,6 +74,7 @@ const HomePage = ({ data }) => {
|
||||
versionPrevious={updates.updates[idx + 1].version}
|
||||
date={node.date}
|
||||
description={node.description}
|
||||
url={node.url}
|
||||
/>
|
||||
))}
|
||||
</WhatsNew>
|
||||
@ -127,6 +128,7 @@ export const pageQuery = graphql`
|
||||
date
|
||||
description
|
||||
version
|
||||
url
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user