[common/features] feat: 환경 변수 URL 방식 도입
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
declare global {
|
||||
interface Window {
|
||||
__ENV__?: Record<string, string>;
|
||||
}
|
||||
}
|
||||
|
||||
export function getEnvConfig(): Record<string, string> {
|
||||
if (typeof window === "undefined") return {};
|
||||
return window.__ENV__ ?? {};
|
||||
}
|
||||
|
||||
export function getEnv(key: string): string | undefined {
|
||||
return getEnvConfig()[key];
|
||||
}
|
||||
@@ -3,3 +3,4 @@ export { useAlertStore } from "./use-alert-store";
|
||||
export { useMenuStore } from "./use-menu-store";
|
||||
export { useUserStore } from "./use-user-store";
|
||||
export { usePrompt } from "./use-prompt";
|
||||
export { getEnv } from "./env";
|
||||
|
||||
Reference in New Issue
Block a user