File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import {
1212 useMatches ,
1313 useNavigate ,
1414 useParams ,
15+ useRouterState ,
1516} from '@tanstack/react-router'
1617import { FrameworkSelect } from '~/components/FrameworkSelect'
1718import { useLocalStorage } from '~/utils/useLocalStorage'
@@ -358,11 +359,7 @@ export function DocsLayout({
358359
359360 const [ showBytes , setShowBytes ] = useLocalStorage ( 'showBytes' , true )
360361
361- const [ mounted , setMounted ] = React . useState ( false )
362-
363- React . useEffect ( ( ) => {
364- setMounted ( true )
365- } , [ ] )
362+ const footerAdKey = useRouterState ( { select : ( d ) => d . location . pathname } )
366363
367364 const menuItems = menuConfig . map ( ( group , i ) => {
368365 const WrapperComp = group . collapsible ? 'details' : 'div'
@@ -399,8 +396,8 @@ export function DocsLayout({
399396 </ a >
400397 ) : (
401398 < Link
402- to = { child . to }
403- params
399+ to = { child . to }
400+ params
404401 onClick = { ( ) => {
405402 detailsRef . current . removeAttribute ( 'open' )
406403 } }
@@ -566,7 +563,10 @@ export function DocsLayout({
566563 >
567564 { children }
568565 </ div >
569- < div className = "mb-8 !py-0 mx-auto max-w-full overflow-x-hidden" >
566+ < div
567+ className = "mb-8 !py-0 mx-auto max-w-full overflow-x-hidden"
568+ key = { footerAdKey }
569+ >
570570 < GadFooter />
571571 </ div >
572572 < div className = "sticky flex items-center flex-wrap bottom-2 z-10 right-0 text-xs md:text-sm px-1 print:hidden" >
You can’t perform that action at this time.
0 commit comments