API > GetPage
The GetGlobal function allows you to fetch the content/properties for only one global.
Fetch the Global by its Id. The function will return a type Global.
import { getGlobal } from "@suncel/nextjs/api";
const getGlobal = async <GlobalContentType = Record<string, any>>(
globalId: string,
options?: GetGlobalOption
): Promise<RequestResult<Global<GlobalContentType>>>
globalId: Id of the Global to fetch
options: Optional fetching options (see below)
type GetGlobalOption = {
language?: string;
};
language: To select the content of the language. If your global have multiple languages