Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions static/app/views/stories/storySourceLinks.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {Fragment} from 'react';
import styled from '@emotion/styled';

import {LinkButton} from 'sentry/components/core/button/linkButton';
import {DateTime} from 'sentry/components/dateTime';
Expand All @@ -24,15 +25,15 @@ export function StorySourceLinks(props: {story: StoryDescriptor}) {
return response.json();
},
});

const committerDate = data?.[0]?.commit.committer.date;

return (
<Fragment>
{committerDate ? (
<Fragment>
Story Last Edited:
<DateTime date={committerDate} />
</Fragment>
<LastEdited>
Last Edited: <DateTime date={committerDate} />
</LastEdited>
) : null}
<LinkButton
href={`https://github.com/getsentry/sentry/blob/master/static/${props.story.filename}`}
Expand All @@ -55,3 +56,8 @@ export function StorySourceLinks(props: {story: StoryDescriptor}) {
</Fragment>
);
}

const LastEdited = styled('span')`
font-size: ${p => p.theme.fontSizeSmall};
color: ${p => p.theme.tokens.content.muted};
`;
Loading