mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-15 11:00:47 +02:00
Bug fixing and debugs (#5704)
Co-authored-by: ConnorYoh <[email protected]>
This commit is contained in:
co-authored by
ConnorYoh
parent
5df466266a
commit
f9d2f36ab7
@@ -37,7 +37,6 @@ export default class ErrorBoundary extends React.Component<ErrorBoundaryProps, E
|
||||
console.error('Current search:', window.location.search);
|
||||
console.error('Timestamp:', new Date().toISOString());
|
||||
console.error('User agent:', navigator.userAgent);
|
||||
|
||||
// Check for React error codes
|
||||
if (error.message.includes('Minified React error')) {
|
||||
const errorCodeMatch = error.message.match(/#(\d+)/);
|
||||
@@ -108,4 +107,4 @@ export default class ErrorBoundary extends React.Component<ErrorBoundaryProps, E
|
||||
|
||||
return this.props.children;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react';
|
||||
import { Menu, Button, ActionIcon } from '@mantine/core';
|
||||
import { Tooltip } from '@app/components/shared/Tooltip';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { supportedLanguages } from '@app/i18n';
|
||||
import { supportedLanguages, setUserLanguage } from '@app/i18n';
|
||||
import LocalIcon from '@app/components/shared/LocalIcon';
|
||||
import styles from '@app/components/shared/LanguageSelector.module.css';
|
||||
import { Z_INDEX_CONFIG_MODAL } from '@app/styles/zIndex';
|
||||
@@ -206,7 +206,8 @@ const LanguageSelector: React.FC<LanguageSelectorProps> = ({
|
||||
|
||||
// Simulate processing time for smooth transition
|
||||
setTimeout(() => {
|
||||
i18n.changeLanguage(value);
|
||||
// Use setUserLanguage to properly set priority (ensures user choice persists across sessions)
|
||||
setUserLanguage(value);
|
||||
|
||||
setTimeout(() => {
|
||||
setPendingLanguage(null);
|
||||
|
||||
Reference in New Issue
Block a user