Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
Telofy committed Apr 10, 2024
2 parents eb70b3e + a63560f commit 83b2b44
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions components/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Head from 'next/head'
import { useRouter } from 'next/router'
import * as React from 'react'
import { useEffect } from 'react'

import { AppShell } from '@mantine/core'
import { useDisclosure } from '@mantine/hooks'
Expand All @@ -17,7 +17,7 @@ export function Layout({ children }: LayoutProps) {
const [opened, { toggle, close }] = useDisclosure()

// Hook to close the menu when a link is clicked
useEffect(() => {
React.useEffect(() => {
router.events.on('routeChangeStart', close)
return () => router.events.off('routeChangeStart', close)
})
Expand All @@ -27,6 +27,9 @@ export function Layout({ children }: LayoutProps) {
classNames={{ main: 'overflow-x-auto pt-[50px] md:pt-6 md:pl-[250px]' }}
padding="md"
>
<Head>
<link rel="canonical" href={`https://givewiki.org${router.asPath}`} />
</Head>
<Header
className="md:hidden h-[50px] max-h-[50px]"
opened={opened}
Expand Down

0 comments on commit 83b2b44

Please sign in to comment.