diff --git a/src/components/ArticleLayout.tsx b/src/components/ArticleLayout.tsx index 3df6a5f..7dca972 100644 --- a/src/components/ArticleLayout.tsx +++ b/src/components/ArticleLayout.tsx @@ -97,7 +97,7 @@ export function ArticleLayout({ - {' '}·{' '} +

{children} diff --git a/src/components/Views.tsx b/src/components/Views.tsx index 4f75ddb..33d5500 100644 --- a/src/components/Views.tsx +++ b/src/components/Views.tsx @@ -13,7 +13,9 @@ type ViewsType = { } export function Views({as: Component = 'span', slug}: { as?: ElementType, slug: string }) { - const {data} = useSWR(`/api/views/${slug}`, fetcher) + const {data} = useSWR(`/api/views/${slug}`, fetcher, { + revalidateOnFocus: false + }) const views = Number(data?.views) useEffect(() => { @@ -27,7 +29,7 @@ export function Views({as: Component = 'span', slug}: { as?: ElementType, slug: return ( - {views > 0 ? `${numberFormat(views)} views` : ''} + {views > 0 ? ` ยท ${numberFormat(views)} views` : ''} ) } \ No newline at end of file