diff --git a/backend/src/index.js b/backend/src/index.js index 31e401d..911fa0f 100644 --- a/backend/src/index.js +++ b/backend/src/index.js @@ -41,7 +41,7 @@ const authLimiter = rateLimit({ }); const apiLimiter = rateLimit({ - windowMs: 15 * 60 * 1000, // 15 minutes + windowMs: 5 * 60 * 1000, // 5 minutes max: 100, // 100 requests per window message: { error: 'Too many requests, please try again later.' }, standardHeaders: true, diff --git a/frontend/src/pages/Friends.jsx b/frontend/src/pages/Friends.jsx index 088e79e..793a084 100644 --- a/frontend/src/pages/Friends.jsx +++ b/frontend/src/pages/Friends.jsx @@ -178,10 +178,11 @@ export default function Friends() { borderBottom: '1px solid var(--border)', display: 'flex', justifyContent: 'space-between', - alignItems: 'center' + alignItems: 'center', + gap: '1rem' }} > -
+
{user.username}
{user.email}
@@ -189,6 +190,7 @@ export default function Friends() { className="btn btn-primary btn-sm" onClick={() => handleSendRequest(user.id)} disabled={sending === user.id} + style={{ flexShrink: 0 }} > {sending === user.id ? 'Sending...' : 'Add Friend'} @@ -204,12 +206,12 @@ export default function Friends() {

Friend Requests

{requests.map(req => ( -
-
+
+
{req.username}
{req.email}
-
+
@@ -271,20 +274,21 @@ export default function Friends() {
)} {challengeFriends.map(friend => ( -
-
+
+
{friend.username}
{friend.email}
-
-
{friend.total_points} points
+
+
{friend.total_points} points
))}