From e9c654e13868d9bc42d1aa636d251542a2e56d43 Mon Sep 17 00:00:00 2001 From: Vishesh 'ironeagle' Bangotra Date: Wed, 12 Nov 2025 03:20:01 +0530 Subject: [PATCH] fixes --- src/blog/components/Latest.tsx | 2 +- src/blog/providers/Author.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/blog/components/Latest.tsx b/src/blog/components/Latest.tsx index 8893b8f..8009172 100644 --- a/src/blog/components/Latest.tsx +++ b/src/blog/components/Latest.tsx @@ -8,7 +8,7 @@ import { styled } from '@mui/material/styles'; import NavigateNextRoundedIcon from '@mui/icons-material/NavigateNextRounded'; import CircularProgress from '@mui/material/CircularProgress'; import { LatestProps } from "../types/props"; -import Fade from '@mui/material/Fade'; // ✅ for smooth appearance +import Fade from '@mui/material/Fade'; const StyledTypography = styled(Typography)({ diff --git a/src/blog/providers/Author.tsx b/src/blog/providers/Author.tsx index e5d1dad..14e0c33 100644 --- a/src/blog/providers/Author.tsx +++ b/src/blog/providers/Author.tsx @@ -19,7 +19,7 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ children setError(null); const res = await api.post('/auth/register', { username, password }); - return res.data; // returns PublicUser from backend + return res.data; // returns PublicUser from the backend } catch (err: any) { console.error('Registration failed:', err); setError(err.response?.data?.detail || 'Registration failed'); @@ -109,7 +109,7 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ children setCurrentUser(fullUser); } catch (err) { console.error('Failed to fetch current user:', err); - logout(); // invalid/expired token + logout(); } };