feat: add i18n and avatar upload

This commit is contained in:
Vaka.pro
2026-04-26 22:16:59 +03:00
parent db41d4a246
commit 1b23097b18
22 changed files with 750 additions and 145 deletions

View File

@@ -1,13 +1,17 @@
import { Navigate, useLocation } from 'react-router-dom';
import type { ReactNode } from 'react';
import { useAuthStore } from '@/features/auth/authStore';
import { useI18n } from '@/i18n/i18n';
export function ProtectedRoute({ children }: { children: ReactNode }) {
const { user, status } = useAuthStore();
const location = useLocation();
const { t } = useI18n();
if (status !== 'ready') {
return (
<div className="flex min-h-[50vh] items-center justify-center text-muted">Loading...</div>
<div className="flex min-h-[50vh] items-center justify-center text-muted">
{t('protected.loading')}
</div>
);
}
if (!user) {