Snyk report fixes + offcanvas sidebar fix (#263)

Refactor:
- Improved consistency and robustness by standardizing file encoding arguments from 'utf-8' to 'utf8' across various file read/write operations.
- Simplified status mapping logic in billing components and services by replacing switch statements with direct mapping objects for clearer and more maintainable code.
- Enhanced type conversion and error handling in billing and internationalization components for improved reliability.
- Updated sorting logic in team member tables for more predictable member ordering.
- Improved error logging with sanitized output to prevent formatting issues.
- Adjusted environment variable whitelisting to use a more flexible matching pattern.
- Fix variables for sidebar style handling

Style:
- Refined spacing and layout in account selector and sidebar header components for better visual consistency.
This commit is contained in:
Giancarlo Buomprisco
2025-06-01 19:10:39 +07:00
committed by GitHub
parent cb80e4fdcf
commit fc2fda595a
18 changed files with 72 additions and 116 deletions

View File

@@ -128,7 +128,7 @@ export function parseAcceptLanguageHeader(
const trimmedLocale = locale.trim();
const numQ = Number(q.replace(/q ?=/, ''));
return [isNaN(numQ) ? 0 : numQ, trimmedLocale];
return [Number.isNaN(numQ) ? 0 : numQ, trimmedLocale];
})
.sort(([q1], [q2]) => q2 - q1) // Sort by quality value in descending order
.flatMap(([_, locale]) => {