The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/apps/meteor/client/views/root/hooks/useSettingsOnLoadSiteUrl.ts

14 lines
377 B

import { useSetting } from '@rocket.chat/ui-contexts';
import { useEffect } from 'react';
export const useSettingsOnLoadSiteUrl = () => {
const siteUrl = useSetting('Site_Url') as string;
useEffect(() => {
const value = siteUrl;
if (value == null || value.trim() === '') {
return;
}
(window as any).__meteor_runtime_config__.ROOT_URL = value;
}, [siteUrl]);
};