Advertisement
jfudson

breadcrumbs

May 14th, 2022
595
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     const location = useLocation()
  2.  
  3.  
  4.     React.useEffect(() => {
  5.         let routes = location.pathname.split("/").slice(2)
  6.         routes[routes.length - 1] = joinName(userInfo) || "User Info"
  7.         pageControl.overwriteBreadcrumbsRoutes(location.pathname, routes)
  8.     }, [location, userInfo])
  9.  
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement