fix: Avoid typescript error for Nextjs usePathname() (#16368)

* Avoid typescript error for Nextjs usePathname()

#fixes 16323

* Update Shell.tsx

---------

Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>
This commit is contained in:
Johannes Zellner
2024-08-27 07:46:55 +00:00
committed by GitHub
co-authored by Anik Dhabal Babu
parent ef1b5067c2
commit 7aae55f417
+1 -1
View File
@@ -215,7 +215,7 @@ const useBanners = () => {
const Layout = (props: LayoutProps) => {
const banners = useBanners();
const pathname = usePathname();
const isFullPageWithoutSidebar = pathname.startsWith("/apps/routing-forms/reporting/");
const isFullPageWithoutSidebar = pathname?.startsWith("/apps/routing-forms/reporting/");
const { data: user } = trpc.viewer.me.useQuery();
const { boot } = useIntercom();
const pageTitle = typeof props.heading === "string" && !props.title ? props.heading : props.title;