  const context = useContext(LocationContext)
  const { location, getSnack } = context

  const handleRandomize = () => {
    const { pathname } = location as WindowLocation
    if (pathname === "/random") {
      getSnack()
    } else {
      navigate("/random")
    }
  }

  return (