diff --git a/src/components/Article/FullArticle.tsx b/src/components/Article/FullArticle.tsx index ecc3c51b..ffa43924 100644 --- a/src/components/Article/FullArticle.tsx +++ b/src/components/Article/FullArticle.tsx @@ -52,11 +52,15 @@ export const FullArticle = (props: ArticleProps) => { ) onMount(() => { + const script = document.createElement('script') + script.async = true + script.src = 'https://ackee.discours.io/increment.js' + script.setAttribute('data-ackee-server', 'https://ackee.discours.io') + script.setAttribute('data-ackee-domain-id', '1004abeb-89b2-4e85-ad97-74f8d2c8ed2d') + document.body.appendChild(script) const windowHash = window.location.hash - if (windowHash?.length > 0) { const comments = document.querySelector(windowHash) - if (comments) { window.scrollTo({ top: comments.getBoundingClientRect().top, diff --git a/src/components/Views/AllAuthors.tsx b/src/components/Views/AllAuthors.tsx index d9c55653..25fbdcf5 100644 --- a/src/components/Views/AllAuthors.tsx +++ b/src/components/Views/AllAuthors.tsx @@ -29,14 +29,19 @@ export const AllAuthorsView = (props: Props) => { const { searchParams, changeSearchParam } = useRouter() const { sortedAuthors } = useAuthorsStore({ authors: props.authors, - sortBy: searchParams().by || 'shouts' + sortBy: searchParams().by || 'name' }) const { session } = useSession() - onMount(() => changeSearchParam('by', 'shouts')) + onMount(() => { + if (!searchParams().by) { + setAuthorsSort('name') + changeSearchParam('by', 'name') + } + }) createEffect(() => { - setAuthorsSort(searchParams().by || 'shouts') + setAuthorsSort(searchParams().by || 'name') setLimit(PAGE_SIZE) }) @@ -211,7 +216,7 @@ export const AllAuthorsView = (props: Props) => { - limit()}> + limit()}>