File tree Expand file tree Collapse file tree 1 file changed +27
-19
lines changed
apps/web/app/(org)/dashboard/caps/components/CapCard Expand file tree Collapse file tree 1 file changed +27
-19
lines changed Original file line number Diff line number Diff line change @@ -20,25 +20,33 @@ interface CapCardAnalyticsProps {
2020}
2121
2222export const CapCardAnalytics = Object . assign (
23- ( { displayCount, totalComments, totalReactions } : CapCardAnalyticsProps ) => (
24- < Shell >
25- < Tooltip content = { `${ displayCount } unique views` } >
26- < IconItem icon = { faEye } >
27- < span className = "text-sm text-gray-12" > { displayCount } </ span >
28- </ IconItem >
29- </ Tooltip >
30- < Tooltip content = { `${ totalComments } comments` } >
31- < IconItem icon = { faComment } >
32- < span className = "text-sm text-gray-12" > { totalComments } </ span >
33- </ IconItem >
34- </ Tooltip >
35- < Tooltip content = { `${ totalReactions } reactions` } >
36- < IconItem icon = { faSmile } >
37- < span className = "text-sm text-gray-12" > { totalReactions } </ span >
38- </ IconItem >
39- </ Tooltip >
40- </ Shell >
41- ) ,
23+ ( {
24+ displayCount,
25+ totalComments,
26+ totalReactions,
27+ isLoadingAnalytics,
28+ } : CapCardAnalyticsProps ) =>
29+ isLoadingAnalytics ? (
30+ < CapCardAnalytics . Skeleton />
31+ ) : (
32+ < Shell >
33+ < Tooltip content = { `${ displayCount } unique views` } >
34+ < IconItem icon = { faEye } >
35+ < span className = "text-sm text-gray-12" > { displayCount } </ span >
36+ </ IconItem >
37+ </ Tooltip >
38+ < Tooltip content = { `${ totalComments } comments` } >
39+ < IconItem icon = { faComment } >
40+ < span className = "text-sm text-gray-12" > { totalComments } </ span >
41+ </ IconItem >
42+ </ Tooltip >
43+ < Tooltip content = { `${ totalReactions } reactions` } >
44+ < IconItem icon = { faSmile } >
45+ < span className = "text-sm text-gray-12" > { totalReactions } </ span >
46+ </ IconItem >
47+ </ Tooltip >
48+ </ Shell >
49+ ) ,
4250 {
4351 Skeleton : ( ) => (
4452 < Shell >
You can’t perform that action at this time.
0 commit comments