For the complete documentation index, see llms.txt. This page is also available as Markdown.

getAppsInTossGlobals

기능 설명

앱인토스 전역 값을 가져와요. 배포 ID와 브랜드 정보(이름, 아이콘, 대표 색상)를 담고 있어요.

상수 값이라 언제 호출해도 같은 값을 동기로 반환해요.

타입

getAppsInTossGlobals(): AppsInTossGlobals;

Params

없음

Response

type AppsInTossGlobals = {
  deploymentId: string;
  brandDisplayName: string;
  brandIcon: string;
  brandPrimaryColor: string;
};

예시 코드

import { getAppsInTossGlobals } from "@apps-in-toss/web-framework";

const { brandDisplayName, brandPrimaryColor } = getAppsInTossGlobals();

document.querySelector("#brand-name").textContent = brandDisplayName;
document.querySelector("#header").style.backgroundColor = brandPrimaryColor;

도움이 되었나요?