diff --git a/CHANGELOG.md b/CHANGELOG.md index 4abdf179..b9880d0d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Added * [#379](https://github.com/shlinkio/shlink-web-client/issues/379) and [#384](https://github.com/shlinkio/shlink-web-client/issues/384) Improved QR code modal, including controls to customize size, format and margin, as well as a button to copy the link to the clipboard. * [#385](https://github.com/shlinkio/shlink-web-client/issues/385) Added setting to determine if "validate URL" should be enabled or disabled by default. +* [#386](https://github.com/shlinkio/shlink-web-client/issues/386) Added new card in overview section to display amount of orphan visits when using Shlink 2.6.0 or higher. ### Changed * *Nothing* diff --git a/src/api/types/index.ts b/src/api/types/index.ts index c5728797..4ca5f7e3 100644 --- a/src/api/types/index.ts +++ b/src/api/types/index.ts @@ -46,6 +46,7 @@ export interface ShlinkVisits { export interface ShlinkVisitsOverview { visitsCount: number; + orphanVisitsCount?: number; // Optional only for versions older than 2.6.0 } export interface ShlinkVisitsParams { diff --git a/src/servers/Overview.tsx b/src/servers/Overview.tsx index 892fe46e..71bc58d6 100644 --- a/src/servers/Overview.tsx +++ b/src/servers/Overview.tsx @@ -38,7 +38,7 @@ export const Overview = ( }: OverviewConnectProps) => { const { loading, shortUrls } = shortUrlsList; const { loading: loadingTags } = tagsList; - const { loading: loadingVisits, visitsCount } = visitsOverview; + const { loading: loadingVisits, visitsCount, orphanVisitsCount } = visitsOverview; const serverId = isServerWithId(selectedServer) ? selectedServer.id : ''; const history = useHistory(); @@ -51,7 +51,7 @@ export const Overview = ( return ( <>