diff --git a/src/routes/[slug]/[...tab].tsx b/src/routes/[slug]/[...tab].tsx index b5918985..9ebe49e6 100644 --- a/src/routes/[slug]/[...tab].tsx +++ b/src/routes/[slug]/[...tab].tsx @@ -1,6 +1,6 @@ import { RouteDefinition, RouteSectionProps, createAsync, useLocation } from '@solidjs/router' import { HttpStatusCode } from '@solidjs/start' -import { ErrorBoundary, Show, Suspense, createEffect, on, onMount } from 'solid-js' +import { ErrorBoundary, Show, Suspense, onMount } from 'solid-js' import { FourOuFourView } from '~/components/Views/FourOuFour' import { Loading } from '~/components/_shared/Loading' import { gaIdentity } from '~/config' @@ -29,6 +29,9 @@ export const route: RouteDefinition = { console.debug('route.load called with params:', params) const article = await fetchShout(params.slug) console.debug('route.load fetched article:', article) + if (!article) { + console.warn('No article fetched for the given slug:', params.slug); + } return { article } } } @@ -96,22 +99,6 @@ export default function ArticlePage(props: RouteSectionProps) { } }) - createEffect( - on( - data, - (a?: Shout) => { - console.debug('createEffect triggered with data:', a) - if (!a?.id) return - window?.gtag?.('event', 'page_view', { - page_title: a.title, - page_location: window?.location.href || '', - page_path: loc.pathname - }) - }, - { defer: true } - ) - ) - return ( { console.error('Rendering 500 error page')