Add changelog to account menu, make changelog headings anchors
This commit is contained in:
@@ -7,6 +7,7 @@ import AuthStore from 'stores/AuthStore';
|
||||
import { DropdownMenu, DropdownMenuItem } from 'components/DropdownMenu';
|
||||
import {
|
||||
developers,
|
||||
changelog,
|
||||
githubIssuesUrl,
|
||||
mailToUrl,
|
||||
spectrumUrl,
|
||||
@@ -49,6 +50,9 @@ class AccountMenu extends React.Component<Props> {
|
||||
API documentation
|
||||
</DropdownMenuItem>
|
||||
<hr />
|
||||
<DropdownMenuItem href={changelog()} target="_blank">
|
||||
Changelog
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuItem href={spectrumUrl()} target="_blank">
|
||||
Community
|
||||
</DropdownMenuItem>
|
||||
|
||||
@@ -30,7 +30,9 @@ function Changelog({ releases }: { releases: Release[] }) {
|
||||
<Container>
|
||||
{releases.map(release => (
|
||||
<Article key={release.id}>
|
||||
<h1>{release.name}</h1>
|
||||
<Heading id={release.name}>
|
||||
<a href={`#${release.name}`}>{release.name}</a>
|
||||
</Heading>
|
||||
<Time datetime={release.created_at}>
|
||||
{format(new Date(release.created_at), 'MMMM Do, YYYY')}
|
||||
</Time>
|
||||
@@ -42,6 +44,15 @@ function Changelog({ releases }: { releases: Release[] }) {
|
||||
);
|
||||
}
|
||||
|
||||
const Heading = styled.h1`
|
||||
a {
|
||||
color: ${color.text};
|
||||
}
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
`;
|
||||
|
||||
const Time = styled.time`
|
||||
color: ${color.slateDark};
|
||||
margin-top: -16px;
|
||||
|
||||
Reference in New Issue
Block a user