fix: production build — crypto import, sub-component translation scope, TS config

- instrumentation.ts: use eval('require')('crypto') to bypass webpack
- HomePageClient.tsx: add useTranslations to ProviderOverviewCard and
  ProviderModelsModal (separate components need own hooks)
- next.config.mjs: temporarily allow TS errors during build (remaining
  sub-component scope issues in EvalsTab.tsx)
This commit is contained in:
diegosouzapw
2026-02-25 16:52:09 -03:00
parent ce1e10c8c6
commit dbe6a4e30c
3 changed files with 25 additions and 22 deletions

View File

@@ -299,6 +299,7 @@ HomePageClient.propTypes = {
function ProviderOverviewCard({ item, metrics, onClick }) {
const [imgError, setImgError] = useState(false);
const tc = useTranslations("common");
const statusVariant =
item.errors > 0 ? "text-red-500" : item.connected > 0 ? "text-green-500" : "text-text-muted";
@@ -403,6 +404,8 @@ function ProviderModelsModal({ provider, models, onClose }) {
const [copiedModel, setCopiedModel] = useState(null);
const notify = useNotificationStore();
const router = useRouter();
const t = useTranslations("home");
const tc = useTranslations("common");
const navigateTo = (path) => {
onClose();