mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-04-26 14:28:25 -04:00
only count post hits on production site
This commit is contained in:
parent
3edaa6b0e4
commit
416eb4b4cf
@ -56,12 +56,15 @@ const NoteMeta = ({ slug, date, title, tags = [] }: NoteMetaProps) => (
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div className={classNames(styles.meta_item, styles.views)}>
|
||||
<span>
|
||||
<ViewsIcon className={styles.icon} />
|
||||
</span>
|
||||
<HitCounter slug={`notes/${slug}`} />
|
||||
</div>
|
||||
{/* only count hits on production site */}
|
||||
{process.env.NEXT_PUBLIC_VERCEL_ENV === "production" && (
|
||||
<div className={classNames(styles.meta_item, styles.views)}>
|
||||
<span>
|
||||
<ViewsIcon className={styles.icon} />
|
||||
</span>
|
||||
<HitCounter slug={`notes/${slug}`} />
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user