This repository has been archived on 2022-10-07. You can view files and clone it, but cannot push or open issues or pull requests.
|
export const useDomain = () => {
|
|
if (typeof window === "undefined") {
|
|
return "";
|
|
}
|
|
|
|
const { hostname } = window.location;
|
|
|
|
return hostname.substring(hostname.lastIndexOf(".", hostname.lastIndexOf(".") - 1) + 1);
|
|
};
|