mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
14 lines
274 B
TypeScript
14 lines
274 B
TypeScript
import { useEffect, useState } from "react";
|
|
|
|
export const useUrl = () => {
|
|
const [url, setUrl] = useState("");
|
|
|
|
useEffect(() => {
|
|
const protocolAndHost = `${window.location.protocol}//${window.location.host}`;
|
|
|
|
setUrl(`${protocolAndHost}`);
|
|
}, []);
|
|
|
|
return url;
|
|
};
|