Skip to content

Commit

Permalink
fix: Avoid typescript error for Nextjs usePathname() (#16368)
Browse files Browse the repository at this point in the history
* Avoid typescript error for Nextjs usePathname()

#fixes 16323

* Update Shell.tsx

---------

Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>
  • Loading branch information
2 people authored and zomars committed Sep 4, 2024
1 parent 1dd7639 commit 705898b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/features/shell/Shell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 705898b

Please sign in to comment.