chore: update tailwindcss to version 4.1.0 across admin, broadcast, landing, and studio panels

refactor: remove unnecessary React import in AuthButton component due to new JSX transform

refactor: simplify imports in LanguageSelector component

fix: remove unused AuthResponse type import in useAuth hook

fix: access Vite environment variables in a type-safe manner in api utility
This commit is contained in:
Cesar Mendivil 2025-11-09 19:02:50 -07:00
parent 789ca92619
commit a501d398ff
10 changed files with 156 additions and 30 deletions

View File

@ -1,3 +1,13 @@
{ {
"extends": ["next/core-web-vitals"] "root": true,
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": ["eslint:recommended"],
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
}
} }

150
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -26,7 +26,7 @@
"@vitejs/plugin-react": "^4.0.3", "@vitejs/plugin-react": "^4.0.3",
"autoprefixer": "^10.4.14", "autoprefixer": "^10.4.14",
"postcss": "^8.4.23", "postcss": "^8.4.23",
"tailwindcss": "^3.4.16", "tailwindcss": "^4.1.0",
"typescript": "^5.2.2", "typescript": "^5.2.2",
"vite": "^4.3.9" "vite": "^4.3.9"
} }

View File

@ -22,7 +22,7 @@
"@vitejs/plugin-react": "^4.0.0", "@vitejs/plugin-react": "^4.0.0",
"autoprefixer": "^10.4.14", "autoprefixer": "^10.4.14",
"postcss": "^8.4.24", "postcss": "^8.4.24",
"tailwindcss": "^3.4.16", "tailwindcss": "^4.1.0",
"typescript": "^5.0.2", "typescript": "^5.0.2",
"vite": "^7.2.0" "vite": "^7.2.0"
} }

View File

@ -36,7 +36,7 @@
"@vitejs/plugin-react": "^4.0.3", "@vitejs/plugin-react": "^4.0.3",
"autoprefixer": "^10.4.14", "autoprefixer": "^10.4.14",
"postcss": "^8.4.23", "postcss": "^8.4.23",
"tailwindcss": "^3.4.16", "tailwindcss": "^4.1.0",
"typescript": "^5.2.2", "typescript": "^5.2.2",
"vite": "^4.3.9" "vite": "^4.3.9"
} }

View File

@ -36,13 +36,13 @@
"zustand": "^4.4.7" "zustand": "^4.4.7"
}, },
"devDependencies": { "devDependencies": {
"@tailwindcss/forms": "^0.5.4", "@tailwindcss/forms": "^0.5.4",
"@types/react": "^18.0.28", "@types/react": "^18.0.28",
"@types/react-dom": "^18.0.11", "@types/react-dom": "^18.0.11",
"@vitejs/plugin-react": "^4.0.3", "@vitejs/plugin-react": "^4.0.3",
"autoprefixer": "^10.4.14", "autoprefixer": "^10.4.14",
"postcss": "^8.4.23", "postcss": "^8.4.23",
"tailwindcss": "^3.4.16", "tailwindcss": "^4.1.0",
"typescript": "^5.2.2", "typescript": "^5.2.2",
"vite": "^4.3.9" "vite": "^4.3.9"
} }

View File

@ -1,4 +1,4 @@
import React from 'react'; // React import removed: using new JSX transform so explicit React import not required
import { useAuth } from '@avanzacast/shared-hooks'; import { useAuth } from '@avanzacast/shared-hooks';
interface AuthButtonProps { interface AuthButtonProps {

View File

@ -1,4 +1,4 @@
import React, { useState } from 'react'; import { useState } from 'react';
import { useLanguage } from '@avanzacast/shared-hooks'; import { useLanguage } from '@avanzacast/shared-hooks';
import type { SupportedLanguage } from '@avanzacast/shared-types'; import type { SupportedLanguage } from '@avanzacast/shared-types';

View File

@ -1,5 +1,5 @@
import { useState, useEffect, useCallback } from 'react'; import { useState, useEffect, useCallback } from 'react';
import type { User, AuthTokens, LoginCredentials, RegisterData, AuthResponse } from '@avanzacast/shared-types'; import type { User, AuthTokens, LoginCredentials, RegisterData } from '@avanzacast/shared-types';
import { import {
saveTokens, saveTokens,
saveUser, saveUser,

View File

@ -1,7 +1,9 @@
import type { LoginCredentials, RegisterData, AuthResponse, ApiResponse } from '@avanzacast/shared-types'; import type { LoginCredentials, RegisterData, AuthResponse, ApiResponse } from '@avanzacast/shared-types';
import { getAuthHeader } from './auth'; import { getAuthHeader } from './auth';
const API_BASE_URL = import.meta.env.VITE_API_URL || 'https://avanzacast-servertokens.bfzqqk.easypanel.host/api/v1'; // Access import.meta.env in a type-safe way even if the project doesn't declare the Vite env typing
const _env = (import.meta as any).env;
const API_BASE_URL = _env.VITE_API_URL || 'https://avanzacast-servertokens.bfzqqk.easypanel.host/api/v1';
/** /**
* Cliente HTTP para hacer peticiones a la API * Cliente HTTP para hacer peticiones a la API