Improve the frontend 3

This commit is contained in:
Urtzi Alfaro
2025-10-30 21:08:07 +01:00
parent 36217a2729
commit 63f5c6d512
184 changed files with 21512 additions and 7442 deletions

View File

@@ -9,12 +9,12 @@ import {
getCookieCategories,
CookiePreferences
} from '../../components/ui/CookieConsent';
import { useToast } from '../../hooks/ui/useToast';
import { showToast } from '../../utils/toast';
export const CookiePreferencesPage: React.FC = () => {
const { t } = useTranslation();
const navigate = useNavigate();
const { success } = useToast();
const [preferences, setPreferences] = useState<CookiePreferences>({
essential: true,
@@ -48,7 +48,7 @@ export const CookiePreferencesPage: React.FC = () => {
};
saveCookieConsent(updatedPreferences);
success(
showToast.success(
t('common:cookie.preferences_saved', 'Your cookie preferences have been saved successfully.'),
{ title: t('common:cookie.success', 'Preferences Saved') }
);
@@ -66,7 +66,7 @@ export const CookiePreferencesPage: React.FC = () => {
saveCookieConsent(allEnabled);
setPreferences(allEnabled);
success(
showToast.success(
t('common:cookie.all_accepted', 'All cookies have been accepted.'),
{ title: t('common:cookie.success', 'Preferences Saved') }
);
@@ -84,7 +84,7 @@ export const CookiePreferencesPage: React.FC = () => {
saveCookieConsent(essentialOnly);
setPreferences(essentialOnly);
success(
showToast.success(
t('common:cookie.only_essential', 'Only essential cookies are enabled.'),
{ title: t('common:cookie.success', 'Preferences Saved') }
);