|
1 | 1 | // import AudienceSelect from './components/AudienceSelect';
|
2 | 2 | import Feedback from './components/Feedback';
|
3 |
| -import KpiCard, {KpiCardContent, KpiCardLabel, KpiCardValue} from '../components/KpiCard'; |
| 3 | +import KpiCard, {KpiCardContent, KpiCardLabel, KpiCardMoreButton, KpiCardValue} from '../components/KpiCard'; |
4 | 4 | import PostAnalyticsContent from '../components/PostAnalyticsContent';
|
5 | 5 | import PostAnalyticsHeader from '../components/PostAnalyticsHeader';
|
6 | 6 | import {BarChartLoadingIndicator, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChartConfig, DataList, DataListBar, DataListBody, DataListItemContent, DataListItemValue, DataListItemValueAbs, DataListItemValuePerc, DataListRow, HTable, Input, LucideIcon, Separator, SimplePagination, SimplePaginationNavigation, SimplePaginationNextButton, SimplePaginationPreviousButton, SkeletonTable, formatNumber, formatPercentage, useSimplePagination} from '@tryghost/shade';
|
@@ -281,41 +281,81 @@ const Newsletter: React.FC<postAnalyticsProps> = () => {
|
281 | 281 | :
|
282 | 282 | <CardContent className='p-0'>
|
283 | 283 | <div className={`grid ${chartHeaderClass} items-stretch border-b`}>
|
284 |
| - <KpiCard className='relative grow p-3 md:p-6'> |
285 |
| - {/* <FunnelArrow /> */} |
286 |
| - <KpiCardLabel> |
| 284 | + <KpiCard className='group relative isolate grow p-3 md:px-6 md:py-5'> |
| 285 | + <KpiCardMoreButton onClick={() => { |
| 286 | + const params = new URLSearchParams({ |
| 287 | + filterParam: `emails.post_id:${postId}`, |
| 288 | + postAnalytics: postId |
| 289 | + }); |
| 290 | + navigate(`/members?${params.toString()}`, {crossApp: true}); |
| 291 | + }}> |
| 292 | + View members → |
| 293 | + </KpiCardMoreButton> |
| 294 | + <KpiCardLabel onClick={() => { |
| 295 | + const params = new URLSearchParams({ |
| 296 | + filterParam: `emails.post_id:${postId}`, |
| 297 | + postAnalytics: postId |
| 298 | + }); |
| 299 | + navigate(`/members?${params.toString()}`, {crossApp: true}); |
| 300 | + }}> |
287 | 301 | <div className='ml-0.5 size-[9px] rounded-full bg-chart-purple !text-sm opacity-50 lg:text-base'></div>
|
288 |
| - {/* <LucideIcon.Send strokeWidth={1.5} /> */} |
289 | 302 | Sent
|
290 | 303 | </KpiCardLabel>
|
291 | 304 | <KpiCardContent>
|
292 |
| - <KpiCardValue className='text-xl sm:text-2xl md:text-[2.6rem]'>{formatNumber(stats.sent)}</KpiCardValue> |
| 305 | + <KpiCardValue className='text-xl leading-none sm:text-2xl md:text-[2.6rem]'>{formatNumber(stats.sent)}</KpiCardValue> |
293 | 306 | </KpiCardContent>
|
294 | 307 | </KpiCard>
|
295 | 308 |
|
296 | 309 | {emailTrackOpensEnabled &&
|
297 |
| - <KpiCard className='relative grow p-3 md:p-6'> |
298 |
| - {/* <FunnelArrow /> */} |
299 |
| - <KpiCardLabel> |
| 310 | + <KpiCard className='p-3 md:px-6 md:py-5'> |
| 311 | + <KpiCardMoreButton onClick={() => { |
| 312 | + const params = new URLSearchParams({ |
| 313 | + filterParam: `opened_emails.post_id:${postId}`, |
| 314 | + postAnalytics: postId |
| 315 | + }); |
| 316 | + navigate(`/members?${params.toString()}`, {crossApp: true}); |
| 317 | + }}> |
| 318 | + View members → |
| 319 | + </KpiCardMoreButton> |
| 320 | + <KpiCardLabel onClick={() => { |
| 321 | + const params = new URLSearchParams({ |
| 322 | + filterParam: `opened_emails.post_id:${postId}`, |
| 323 | + postAnalytics: postId |
| 324 | + }); |
| 325 | + navigate(`/members?${params.toString()}`, {crossApp: true}); |
| 326 | + }}> |
300 | 327 | <div className='ml-0.5 size-[9px] rounded-full bg-chart-blue !text-sm opacity-50 lg:text-base'></div>
|
301 |
| - {/* <LucideIcon.Eye strokeWidth={1.5} /> */} |
302 |
| - Opened |
| 328 | + Opened |
303 | 329 | </KpiCardLabel>
|
304 | 330 | <KpiCardContent>
|
305 |
| - <KpiCardValue className='text-xl sm:text-2xl md:text-[2.6rem]'>{formatNumber(stats.opened)}</KpiCardValue> |
| 331 | + <KpiCardValue className='text-xl leading-none sm:text-2xl md:text-[2.6rem]'>{formatNumber(stats.opened)}</KpiCardValue> |
306 | 332 | </KpiCardContent>
|
307 | 333 | </KpiCard>
|
308 | 334 | }
|
309 | 335 |
|
310 | 336 | {emailTrackClicksEnabled &&
|
311 |
| - <KpiCard className='relative grow p-3 md:p-6'> |
312 |
| - <KpiCardLabel> |
| 337 | + <KpiCard className='group relative isolate grow p-3 md:px-6 md:py-5'> |
| 338 | + <KpiCardMoreButton onClick={() => { |
| 339 | + const params = new URLSearchParams({ |
| 340 | + filterParam: `clicked_links.post_id:${postId}`, |
| 341 | + postAnalytics: postId |
| 342 | + }); |
| 343 | + navigate(`/members?${params.toString()}`, {crossApp: true}); |
| 344 | + }}> |
| 345 | + View members → |
| 346 | + </KpiCardMoreButton> |
| 347 | + <KpiCardLabel onClick={() => { |
| 348 | + const params = new URLSearchParams({ |
| 349 | + filterParam: `clicked_links.post_id:${postId}`, |
| 350 | + postAnalytics: postId |
| 351 | + }); |
| 352 | + navigate(`/members?${params.toString()}`, {crossApp: true}); |
| 353 | + }}> |
313 | 354 | <div className='ml-0.5 size-[9px] rounded-full bg-chart-teal !text-sm opacity-50 lg:text-base'></div>
|
314 |
| - {/* <LucideIcon.MousePointer strokeWidth={1.5} /> */} |
315 |
| - Clicked |
| 355 | + Clicked |
316 | 356 | </KpiCardLabel>
|
317 | 357 | <KpiCardContent>
|
318 |
| - <KpiCardValue className='text-xl sm:text-2xl md:text-[2.6rem]'>{formatNumber(stats.clicked)}</KpiCardValue> |
| 358 | + <KpiCardValue className='text-xl leading-none sm:text-2xl md:text-[2.6rem]'>{formatNumber(stats.clicked)}</KpiCardValue> |
319 | 359 | </KpiCardContent>
|
320 | 360 | </KpiCard>
|
321 | 361 | }
|
|
0 commit comments