mirror of
https://github.com/andwati/dokploy.git
synced 2026-10-20 03:54:29 +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;
|
|
};
|