getAppsInTossGlobals
Function description
Gets the Apps in Toss global values. It contains deployment ID and brand information (name, icon, primary color).
Since it is a constant value, it returns the same value synchronously no matter when you call it.
Type
getAppsInTossGlobals(): AppsInTossGlobals;Params
None
Response
type AppsInTossGlobals = {
deploymentId: string;
brandDisplayName: string;
brandIcon: string;
brandPrimaryColor: string;
};Example code
import { getAppsInTossGlobals } from "@apps-in-toss/web-framework";
const { brandDisplayName, brandPrimaryColor } = getAppsInTossGlobals();
document.querySelector("#brand-name").textContent = brandDisplayName;
document.querySelector("#header").style.backgroundColor = brandPrimaryColor;Was this helpful?