import { useLayoutEffect } from 'react'
import { useLocation } from 'react-router-dom'
import { syncAuthShellBackdrop } from '../auth/auth-shell-backdrop'

export function AuthShellBackdropSync() {
  const location = useLocation()

  useLayoutEffect(() => {
    syncAuthShellBackdrop(location.pathname)
  }, [location.pathname])

  return null
}
