
"use client";
import { useEffect, useState } from "react";

export function useCurrentUrl() {
  const [url, setUrl] = useState("");
  useEffect(() => {
    setUrl(window.location.href);
  }, [window.location.href]);
  return url;
}
