useSite

useSite(options?: SiteInfoOptions, deps?: any[]): ISiteInfo | null | undefined;

Returns current site info.

Examples

Get site info details,

const siteInfo = useSite();

Query site info details,

const site = useSite({
	query: {
		select: ["Title", "Id"]
	}
});

Parameters

NameTypeDescriptionTracked for changes
options?SiteInfoOptionsuseSite hook optionsPartially
deps?DependencyListHook dependency list.Yes