mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-02 05:36:38 +00:00
Added short URL title to visits header
This commit is contained in:
@@ -61,7 +61,8 @@ body,
|
||||
.dropdown-divider,
|
||||
.dropdown-menu,
|
||||
.list-group-item,
|
||||
.modal-content {
|
||||
.modal-content,
|
||||
hr {
|
||||
border-color: var(--border-color);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ $mediumGrey: #dee2e6;
|
||||
$textPlaceholder: #6c757d;
|
||||
|
||||
// Misc
|
||||
$headerHeight: 57px;
|
||||
$headerHeight: 56px;
|
||||
$asideMenuWidth: 260px;
|
||||
$footer-height: 2.3rem;
|
||||
$footer-margin: .8rem;
|
||||
|
||||
@@ -17,6 +17,7 @@ const ShortUrlVisitsHeader = ({ shortUrlDetail, shortUrlVisits, goBack }: ShortU
|
||||
const { visits } = shortUrlVisits;
|
||||
const shortLink = shortUrl?.shortUrl ?? '';
|
||||
const longLink = shortUrl?.longUrl ?? '';
|
||||
const title = shortUrl?.title;
|
||||
|
||||
const renderDate = () => !shortUrl ? <small>Loading...</small> : (
|
||||
<span>
|
||||
@@ -39,9 +40,9 @@ const ShortUrlVisitsHeader = ({ shortUrlDetail, shortUrlVisits, goBack }: ShortU
|
||||
<hr />
|
||||
<div>Created: {renderDate()}</div>
|
||||
<div>
|
||||
Long URL:{' '}
|
||||
{`${title ? 'Title' : 'Long URL'}: `}
|
||||
{loading && <small>Loading...</small>}
|
||||
{!loading && <ExternalLink href={longLink} />}
|
||||
{!loading && <ExternalLink href={longLink}>{title ?? longLink}</ExternalLink>}
|
||||
</div>
|
||||
</VisitsHeader>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user