From 2333e28720f2bde7bcdbc35e3a36c8dec57b9066 Mon Sep 17 00:00:00 2001 From: SlimusMinus Date: Mon, 24 Aug 2026 01:47:28 +0300 Subject: [PATCH] colored header on post --- src/hooks/useFavorites.js | 1 - src/pages/PostOnFeed.jsx | 4 +++- src/styles/card.css | 20 ++++++++++++++++++-- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/hooks/useFavorites.js b/src/hooks/useFavorites.js index fd07887..72b16a0 100644 --- a/src/hooks/useFavorites.js +++ b/src/hooks/useFavorites.js @@ -1,4 +1,3 @@ -// src/hooks/useFavorites.js import { useState, useCallback } from 'react'; import { useTranslation } from 'react-i18next'; import { API_URL } from '../config/authConstants'; diff --git a/src/pages/PostOnFeed.jsx b/src/pages/PostOnFeed.jsx index 1e17823..f830b0e 100644 --- a/src/pages/PostOnFeed.jsx +++ b/src/pages/PostOnFeed.jsx @@ -49,6 +49,8 @@ export default function PostOnFeed({ ad, liked, likeCountAdj, onLike, onEdit, on const isClosed = ad.status === 'CLOSED'; + const headAccentClass = ad.type === "found" ? " f-head-found" : " f-head-loss"; + const typeBadge = (
{ad.type === "loss" ? t('postCard.loss') : t('postCard.found')} @@ -58,7 +60,7 @@ export default function PostOnFeed({ ad, liked, likeCountAdj, onLike, onEdit, on return (
-
+