frontend: try loading env explicitly

This commit is contained in:
martin-mfg
2026-04-19 20:16:42 +02:00
parent 5ccb799198
commit f7b1b9f382
2 changed files with 4 additions and 1 deletions
@@ -1,5 +1,6 @@
// @ts-expect-error type info should be added later
import { router } from "@stats-organization/github-readme-stats-backend";
import { loadConfigFromEnv } from "@stats-organization/github-readme-stats-core";
import axios from "axios";
import { useEffect, useRef, useState } from "react";
import type { JSX } from "react";
@@ -48,6 +49,8 @@ export function SvgInline(props: SvgInlineProps): JSX.Element {
const loadSvg = async () => {
window.process.env.PAT_1 = userToken as string;
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
loadConfigFromEnv(window.process.env);
setLoaded(false);
+1 -1
View File
@@ -20,6 +20,6 @@ export { default as pin } from "./api/pin.js";
export { default as topLangs } from "./api/top-langs.js";
export { default as wakatime } from "./api/wakatime.js";
export { getConfig } from "./common/config.js";
export { getConfig, loadConfigFromEnv } from "./common/config.js";
export { themes } from "./themes/index.js";