mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-30 03:25:22 +02: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;
|
|
};
|